14.10.2013, 19:13
Alright, I'm working on a small command. When I type /knock a voice appears and asks me if I want drugs or weapons. Now, what I want to implement is that either you say "drugs" or "weapons" normally in the chatbox and if you type drugs you will get a menu with drugs, etc. If you write something else than drugs or weapons the server will say "ERROR: Please type what you want; DRUGS or WEAPONS."
My code sofar:
My code sofar:
pawn Код:
CMD:knock(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1852.2755,-1990.1522,13.5469))
{
SendClientMessage(playerid, COLOR_PURPLE, "* The door opens slightly.");
SendClientMessage(playerid, -1, "Andres: Ey' holmes? You need DRUGS or WEAPONS?");
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2637.0984,-1991.6788,14.3240))
{
SendClientMessage(playerid, COLOR_PURPLE, "* The door opens slightly.");
SendClientMessage(playerid, -1, "Jamal: A'yo, nigga. Chu' want DRUGS or WEAPONS?");
} else return SendClientMessage(playerid, COLOR_RED, "[Error]: You need to be at the right door to knock");
return 1;
}