09.06.2013, 08:38
Or again, you can try using something like the following:
ZCMD
STRCMP
Hope this kind of helps.
ZCMD
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == helppickup) //Obviously, helppickup stands for the pickup you mentioned
{
cmd_help(playerid, ""); //This will execute the /help command for 'playerid' with no parameters.
}
return 1;
}
CMD:help(playerid, params[])
{
//stuff here
return 1;
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == helppickup)
{
OnPlayerCommandText(playerid, "/help");
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/help", true) == 0)
{
//stuff here
return 1;
}
return 0;
}