Guten Abend com,
ich habe user die gerne mal sich ein infernus als skin geben was mich langsam nervt
ich weiß leider net mehr genau wie ich noch ma abfrage ob er mher als 299 eingibt
hier mal der befehl
if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Hilfe : /setskin [playerid/PartOfName] [skin model]");
return 1;
}
new playa;
new health;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
health = strvalEx(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new name[20];
new victim[20];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(playa, victim, sizeof(victim));
PlayerInfo[playa][pModel] = health;
PlayerInfo[playa][pChar] = health;
SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
format(string, 256, "AdmWarning: [%s] Skin was just set to %d by %s!",victim,health,name);
ABroadCast(COLOR_YELLOW,string,1347);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du bist kein Admin!");
}
}
return 1;
}