11.11.2011, 18:07
Your code's a mess.
pawn Код:
if (strcmp("/gotolp", cmdtext, true, 10) == 0) {
if(IsPlayerAdmin(playerid)) { // Open bracket that you forgot.
SendClientMessage(playerid,YELLOW, "(INFO) You have been teleported to Las Payasadas!");
SetPlayerPos(playerid,-247.7184,2692.8208,62.6875);
// The "return 1;" was needless since you are calling "return 1;" after the else statement, therefore you're calling the "return" function twice, causing the other return to be unreachable. Returning a true value in OnPlayerCommandText stands for a successfully executed command. Once is enough.
}
else { // You should put an opening bracket here.
SendClientMessage(playerid,YELLOW, "(INFO) This command is for administrators only!");
} // This is a closing bracket, not an opening one.
return 1;
}