13.05.2011, 17:32
Quote:
Show us your command code for "givedrugmats" and "givewepmats" as with dcmd, the code for 'dcmd(...);' is actually once compiled turned in to your command.
|
Quote:
dcmd_givedrugmats(playerid, params[]){ new id, drugmatamount, idname[30]; if (sscanf(params, "ui", id, drugmatamount))SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/givedrugmats <playerid> <amount>\""); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else{ //=====GIVING STRING DRUG MATS===== PlayerStats[id][PDrugMats] += drugmatamount; new drugmats[30]; format(drugmats,sizeof(drugmats),"You recieved %i drug material(s).",drugmatamount); SendClientMessage(id, 0x00FF00AA, drugmats); new drugmats2[30]; format(drugmats2,sizeof(drugmats2),"You gave %s %i drug material(s).",GetPlayerName(id,idname,sizeof(idnam e)),drugmatamount); SendClientMessage(playerid, 0x00FF00AA,drugmats2); } return 1; } //new WepNumber; dcmd_givewepmats(playerid, params[]){ new id, wepmatamount, idname[30]; if (sscanf(params, "ui", id, wepmatamount))SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/givewepmats <playerid> <amount>\""); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else{ //=====GIVING STRING WEAPON MATS===== PlayerStats[playerid][PWepMats] = wepmatamount; new wepmats[30]; format(wepmats,sizeof(wepmats),"You recieved %i weapon material(s).",wepmatamount); SendClientMessage(id, 0x00FF00AA, wepmats); new wepmats2[30]; format(wepmats2,sizeof(wepmats2),"You gave %s %i weapon matierial(s).",GetPlayerName(id,idname,sizeof(idna me)),wepmatamount); SendClientMessage(playerid, 0x00FF00AA, wepmats2); } return 1; } dcmd(givedrugmats, 12, cmdtext); dcmd(givewepmats, 11, cmdtext); |