public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if (strcmp("/mycommand", cmdtext, true, 10) == 0)//you must replace the "10" with the lenght of letters, including "/"
{
// Do something here
return 1;
}
return 0;
}
|
Originally Posted by Adil_Rahoo
You just needed to add one bracket, everything was fine, but change the 2nd "/mycommand".
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if (strcmp("/mycommand", cmdtext, true, 10) == 0)//you must replace the "10" with the lenght of letters, including "/"
{
// Do something here
return 1;
}
return 0;
}
|
|
Originally Posted by DeltaAirlines12
LOL, this is the second time you helped me. I appreciate it much! THANKS!
|
|
Originally Posted by Calgon
Like above, with a trialling } bracket. You missed a bracket out.
pawn Код:
|
|
Originally Posted by Adil_Rahoo
Quote:
Regards, Adil. |