06.06.2010, 08:47
How to make 2 attributes cmd? (No LARP edit)
cmd will like /cmdtext 1attr 2attr
cmd will like /cmdtext 1attr 2attr
dcmd_sethealth(playerid,params[]) { if(!IsPlayerAdmin(playerid) return SendClientMessage(playerid,oxffffffaa, "You are not authorised to use this command"); new tmp[128],tmp2[128],health,targetid,Index; tmp=strtok(params,Index); tmp2=strtok(params,Index); if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, oxffffffaa, " Usage: /sethealth playerid health"); if(strval(tmp2)>100) return SendClientMessage(playerid, oxffffffaa, " Invalid health amount."); targetid=strval(tmp); health=strval(tmp2); SetPlayerHealth(targetid,health); return 1; }