16.04.2013, 00:34
pawn Код:
CMD:giveweed(playerid,params[])
{
if(PlayerInfo[playerid][pJob] == 1)
{
new targetid,type;
if(sscanf(params, "ud", targetid, type)) return SendClientMessage(playerid, -1, "[Usage]: /giveweed [Part of Name/Player ID] [Amount]");
if(type > PlayerInfo[playerid][pWeed])return SendClientMessage(playerid,-1,"ERROR: You do not have that much amount of weeds!");
if(targetid == playerid)return SendClientMessage(playerid,-1,"ERROR: You cannot give drugs to your self!");
PlayerInfo[playerid][pWeed] -= type;
PlayerInfo[targetid][pWeed] +=type;
}
else
{
SendClientMessage(playerid, -1, "you're not a drugdealer.");
}
return 1;
}