need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: need help (
/showthread.php?tid=411255)
need help -
James Coral - 28.01.2013
pawn Код:
CMD:drift1(playerid, params[])
{
new string[256];
if(DM[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You cant use this command while in DeathMatch");
}
if(Spawned[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "You are not spawned you cant use this command");
}
else if(Spawned[playerid] == 1)
{
SetPlayerPos(playerid, -299.4920,1537.1998,75.5625);
format(string, sizeof(string), "(%d)%s has teleported himself to (/drift1)", playerid, getPlayerName(playerid));
SendClientMessageToAll(COLOR_RED, string);
}
return 1;
}
THIS WONT WORK:
pawn Код:
if(DM[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You cant use this command while in DeathMatch");
}
Re: need help -
Kirollos - 28.01.2013
1) do you do DM[playerid] = 1; in any where that the player can enter dm area?
if you already had step 1:
try this
pawn Код:
if(DM[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You cant use this command while in DeathMatch");
return 1;
}
Re: need help -
James Coral - 28.01.2013
EDIT: YOU CODE WORKING THANKS