03.03.2013, 15:57
Hi guys, who can help me to do "/giveplayerweapon" command using strtok?
Thx
Thx
if(strcmp(cmd,"/giveweapon",true) == 0)//check if the player does the command
{
new target,weapon,ammo;//define the variables
if(sscanf(params,"iii",target,weapon,ammo)) return SendClientMessage(playerid,0x0FFFFFF,"Usage: /giveweapon [playerid][weaponid][ammo]");//check if the player typed all the params
GivePlayerWeapon(target,weapon,ammo);//give the target the gun and ammo
SendClientMessage(playerid,0x0FFFFFF,"You gave the player a gun.");//send a confirmation to the player that the command was succesfull
SendClientMessage(target,0x0FFFFFF,"You have received a gun");//let the target know he received a gun
return 1;
}
error 017: undefined symbol "params"