11.02.2018, 08:47
So I'm trying to create a command
Is there any way a player can just write "f", "fi", or "fir" instead of the whole word "fire"?
PHP код:
CMD:createeffect(playerid, params[])
{
new id, effect[15];
if(sscanf(params, "r,s[15]", id, effect))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /createeffect [PON/id] [fire/lightning]");
return 1;
}
if(strcmp(effect, "fire", true) == 0)
{
CreateEffect(id, 1);
}
return 1;
}