29.07.2015, 19:45
I don't know why , but it seems like the id's and name's are wrong on my server?
For example:
i'm typing /givegun hurdock 24 50 = > The Server gives gun to player 'cata'
screen:
http://i.imgur.com/QJ5fJ4p.png
command :
... how can i fix it .. why is happen this.. ? last week problems like this didn't exist
For example:
i'm typing /givegun hurdock 24 50 = > The Server gives gun to player 'cata'
screen:
http://i.imgur.com/QJ5fJ4p.png
command :
pawn Код:
if(strcmp(cmd, "/givegun", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givegun [playerid/PartOfName] [weaponid(eg. 46 = Parachute)] [ammo]");
return 1;
}
new playa;
new gun;
new ammo;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
gun = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givegun [playerid/PartOfName] [weaponid] [ammo]");
return 1;
}
tmp = strtok(cmdtext, idx);
ammo = strval(tmp);
if(ammo <1||ammo > 9999) return 1;
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GiveGun(playa, gun, ammo);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string), "%s a primit arma cu id %d de la %s ", GetName(giveplayerid), gun, GetName(playerid));
TrimiteEchipa(string);
format(string, sizeof(string), "{e53535}(Informatie necesarг){FF6633} ai primit arma cu id %d de la %s",gun , GetName(playerid));
SendClientMessage(giveplayerid, -1, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "you are not authorized to use that command!");
}
}
return 1;
}