PDA

View Full Version : OnPlayerText


Ananisiki
16/04/2014, 07:33 PM
So i have administrator chat in onplayertext, and code under that, but the code under the chat dont work (it is a shop)

if i place the shop code 1st and the administrator chat under it, then the admin chat dont work, can this be because of the returns in end of the code?


SendMessageToAdmins(COLOR_GREEN, adminText);
return 0;
}
}

// end of the admin chat

SendClientMessage(i, COLOR_WHITE, string);
}
}

}
return 0;
}
}
return 1;
}

// end of shop

S4t3K
16/04/2014, 07:39 PM
Try to return 0 to OnPlayerText, and to return 1 to your chats.

Or simply



// Admin chat

return SendMessageToAdmins(COLOR_GREEN, adminText);
}
}

// End of admin chat

return SendClientMessage(i, COLOR_WHITE, string);
}
}

}
}
}
return 1;
}

// end of shop

Ananisiki
16/04/2014, 07:43 PM
I did return 0 on the end but not helping.... its same

S4t3K
16/04/2014, 07:46 PM
Well, have you got a warning at compiling ?

Something like "warning xxx : unrecheable code"

Ananisiki
16/04/2014, 08:21 PM
Nop everything compiles fine

Ananisiki
19/04/2014, 01:16 PM
Bump

Astralis
19/04/2014, 01:19 PM
Post your whole OnPlayerText, so we might help you better.

Ananisiki
19/04/2014, 01:34 PM
Pretty much i want to keep secret, want me to pm to you?

Konstantinos
19/04/2014, 01:57 PM
You should read the Forum Rules:

Do Not Request Private Help - These are public forums where anyone can request free help in public, and to that end people will generally need to be able to see your code to help you. If you are not willing to post what is needed publicly, then you are not participating in a "community" in which everyone can learn from each other. Either post what is needed or post in this topic for private help, and be willing to pay for it (http://forum.sa-mp.com/showthread.php?t=447813). Do not post topics requesting private help via Skype, private message, or other non-public system. This includes contacting people for help without making a topic first.