09.04.2012, 21:30
hello guys im making a systeme of mateials when some one drop materials he can control on them i mean ex
/dropmats (ammount) so if he want drop only 1 materials he can drop only '1'
im made it but when i do ex : /dropmats '1' it droping all mats mats on ground .
check
:
/dropmats (ammount) so if he want drop only 1 materials he can drop only '1'
im made it but when i do ex : /dropmats '1' it droping all mats mats on ground .
check
:
Код:
if(strcmp(cmd, "/pmats", true) == 0|| strcmp(cmd, "/posermateriels", true) == 0) // By FreshKilla { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /pmats [montant]"); return 1; } new stash = PlayerInfo[playerid][pMats]; if(stash != 0) { new mammount; mammount = strval(tmp); if(mammount > PlayerInfo[playerid][pMats]) { SendClientMessage(playerid, COLOR_GREY, " Vous n'avez pas suffisament de matйriaux."); return 1; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); PlayerInfo[playerid][pMats] -= mammount; PlayerInfo[giveplayerid][pMats] += mammount; ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); format(string, sizeof(string), "* %s laisse tomber ses Matos а terre.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SendClientMessage(playerid, COLOR_GREY, " Vous avez laissй tomber vos matйriaux dans le sol."); GetPlayerName(playerid,tmp,MAX_PLAYER_NAME); for(new i = 0; i < sizeof(DropInfo); i++)