18.03.2011, 16:50
Well when i createorg and set someone leader it says "that user is not connected"
pawn Код:
CMD:createlaw1(playerid, params[])
{
new str[500],wep1,wep2,wep3,id, ammo, name;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"SERVER: Unknown command.");
if(sscanf(params,"uiiiis", id,wep1,wep2,wep3,ammo,name)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /createlaw1 [id] [wep1] [wep2] [wep3] [ammo] [name]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
if(wep1 > 0 && wep1 < 36)
if(wep2 > 0 && wep2 < 36)
if(wep3 > 0 && wep3 < 36)
{
if(ammo > 0 && ammo < 5000)
{
format(str, sizeof(str), "An Admin has set you the leader of %s",str);
SendClientMessage(id,0xFF9900AA, str);
IsLaw[id] = 1;
Member[id] = 1;
Leader[id] = 1;
IsInOrg[id] = 1;
GivePlayerWeapon(id,wep1, ammo);
GivePlayerWeapon(id,wep2, ammo);
GivePlayerWeapon(id,wep3, ammo);
return 1;
}
else
{
SendClientMessage(playerid,0xFF0000FF, "Ammo meet be between 0 And 5000.");
}
}
else
{
SendClientMessage(playerid,0xFF0000FF, "Invalid Weapon ID!");
}
return 1;
}