12.04.2011, 19:24
Код:
if(strcmp(cmd, "/giveweapon", true) == 0) { if(IsPlayerAdmin(playerid)) { new var1, var2; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4444FF, "[ERROR] Usage: /giveweapon [id] [WeaponID]"); var1 = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4444FF, "[ERROR] Usage: /giveweapon [id] [WeaponID]"); var2 = strval(tmp); GivePlayerWeapon(var1,var2,2000); } else { SendClientMessage(playerid,0xFF4444FF,"* You can not use this command"); } return 1; }
- var1 = The player ID
- var2 = The weapon ID
- The ammo = 2000
It checks if you are Rcon Admin.
And when you mean with "takegun" resetting the weapons of a player then just change the command above a bit and you are done.
Quote:
no i will put gun in interior and then take it are you understand ? wie puting gun in car you have 6 slots to put and then the gun save in car then on reconnect draw gun. ok give me zcmd |