else if(strcmp(x_nr,"relv",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /anna gun [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(5.0, playerid, giveplayerid))
{
new gunID = GetPlayerWeapon(playerid);
new gunAmmo = GetPlayerAmmo(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(gunID != 0 && gunAmmo != 0)
{
//SafeGivePlayerWeapon(giveplayerid, gunID, gunAmmo);
RemovePlayerWeapon(playerid, gunID);
RelvNimi[playerid] = gunID;
RelvKuul[playerid] = gunAmmo;
RelvSaam[playerid] = 1;
format(string, sizeof(string), "[SЬSTEEM] %s tahab anda sulle relvi. [Relv: %d || Laskemoon: %d]", gunID, gunAmmo);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SendClientMessage(giveplayerid, COLOR_WHITE, "[SЬSTEEM] Kui tahad nхustuda relva andmist, siis kirjuta /nхustu relv.");
format(string, sizeof(string), "* %s annab oma relva %s.", sendername, giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Sul ei ole relvi, et mida anda!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Mдngija ei ole sinu lдhedal!");
return 1;
}
}
}
}
format(string, sizeof(string), "[SЬSTEEM] %s tahab anda sulle relvi. [Relv: %d || Laskemoon: %d]", sendername, gunID, gunAmmo);
may be:
PHP код:
|