- เครดิต
- 140
- ความรู้
-
- เงิน $
-
- ความดี
-
|
if(strcmp(cmd, "/givegun2", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givegun2 [playerid1] [playerid2] [playerid3] [playerid4] [playerid5] [gunid] [ammo]");
return 1;
}
new para1;
new para2;
new para3;
new para4;
new para5;
new gun;
new ammo;
para1 = strval(tmp);
tmp = strtok(cmdtext, idx);
para2 = strval(tmp);
tmp = strtok(cmdtext, idx);
para3 = strval(tmp);
tmp = strtok(cmdtext, idx);
para4 = strval(tmp);
tmp = strtok(cmdtext, idx);
para5 = strval(tmp);
tmp = strtok(cmdtext, idx);
gun = strval(tmp);
tmp = strtok(cmdtext, idx);
ammo = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if (IsPlayerConnected(para1)){ GivePlayerWeapon(para1, gun, ammo);}
if ((IsPlayerConnected(para2)) && (para2>0)) { GivePlayerWeapon(para2, gun, ammo);}
if ((IsPlayerConnected(para3)) && (para3>0)) { GivePlayerWeapon(para3, gun, ammo);}
if ((IsPlayerConnected(para4)) && (para4>0)) { GivePlayerWeapon(para4, gun, ammo);}
if ((IsPlayerConnected(para5)) && (para5>0)) { GivePlayerWeapon(para5, gun, ammo);}
GetPlayerName(playerid,sendername, sizeof(sendername));
format(string, 256, "AdmWarning: %s ä´éàÊ¡ÍÒÇظËÁÒÂàÅ¢ %d ¨Ó¹Ç¹ %d ¹Ñ´ ãËé¡Ñº ¤¹ 5 ¤¹ ", sendername, gun, ammo);
SendAdminMessage(COLOR_YELLOW, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
ไม่ขอไรมากคับขอแค่คำขอบคุณก็พอคับ
|
|