22.08.2009, 21:39
Is there a way for like two commands to do the same thing without having to copy and paste the whole code twice?
For example, I want /a and /b to do the samething, but not have to do
For example, I want /a and /b to do the samething, but not have to do
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/a", true) == 0)
{
// CODE
return 1;
}
if(strcmp(cmdtext, "/b", true) == 0)
{
// SAME CODE
return 1;
}
return 0;
}