- เครดิต
- 254
- ความรู้
-
- เงิน $
-
- ความดี
-
|
ใส่
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]");
SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
SendClientMessage(playerid, COLOR_GRAD4, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
return 1;
}
new gun;
new ammo;
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
gun = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givegun [playerid/PartOfName] [weaponid] [ammo]");
SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
SendClientMessage(playerid, COLOR_GRAD4, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
return 1;
}
tmp = strtok(cmdtext, idx);
ammo = strval(tmp);
if(ammo <1||ammo > 999999)
{ SendClientMessage(playerid, COLOR_GRAD1, " dont go below 1 or above 999 bullets!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(playerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GivePlayerWeapon(giveplayerid, gun, ammo);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, 256, "AdmWarning: %s ä´éàÊ¡ÍÒÇظËÁÒÂàÅ¢ %d ¨Ó¹Ç¹ %d ¹Ñ´ ãËé¡Ñº %s", sendername, gun, ammo, giveplayer);
SendAdminMessage(COLOR_YELLOW, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
จบ
|
|