SA-MP Forums Archive
Need Help on my command /leavedm - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help on my command /leavedm (/showthread.php?tid=276347)



Need Help on my command /leavedm - lyrics - 13.08.2011

Hey yeah i create /leavedm
Heres i want when i type /leavedm i will leave the deathmatch area
On Next Type /leavedm i need to have a message return saying "You already Leave The DM"

Heres The Code

pawn Код:
if(strcmp("/leavedm", cmdtext, true, 10) == 0)
 {
    SetPVarInt(playerid, "InDm", 0);
    SetPlayerPos(playerid,-687.8727,938.8134,13.6328);
    SetPlayerFacingAngle(playerid, 13.6328);
    SendClientMessage(playerid, COLOR_RED, "You left The Deathmatch Area");
    return 1;
 }
Hope you help me


Re: Need Help on my command /leavedm - PhoenixB - 13.08.2011

You mean something like a timer, so the command can only be used once until a few seconds/minutes?


Re: Need Help on my command /leavedm - lyrics - 13.08.2011

No i mean when oyu type /leavedm you leave the dm then on next type /leavedm theres send message "You already leave dm"


Re: Need Help on my command /leavedm - Meinstad - 13.08.2011

PHP код:
if(InDM) = {
    
SetPVarInt(playerid"InDm"0);
    
SetPlayerPos(playerid,-687.8727,938.8134,13.6328);
    
SetPlayerFacingAngle(playerid13.6328);
    
SendClientMessage(playeridCOLOR_RED"You left The Deathmatch Area");
    return 
1;
}
else(
InDM) = {
    
SendClientMessage(playeridCOLOR_RED"You are not in the DM area);

Something like that, hope you get the point.


Re: Need Help on my command /leavedm - lyrics - 13.08.2011

Quote:
Originally Posted by Meinstad
Посмотреть сообщение
PHP код:
if(InDM) = {
    
SetPVarInt(playerid"InDm"0);
    
SetPlayerPos(playerid,-687.8727,938.8134,13.6328);
    
SetPlayerFacingAngle(playerid13.6328);
    
SendClientMessage(playeridCOLOR_RED"You left The Deathmatch Area");
    return 
1;
}
else(
InDM) = {
    
SendClientMessage(playeridCOLOR_RED"You are not in the DM area);

Something like that, hope you get the point.
didnt work


Re: Need Help on my command /leavedm - Wesley221 - 13.08.2011

pawn Код:
if(GetPVarInt(playerid, "InDm") == 0) return SendClientMessage(playerid, -1, "You are not in the DM area");
Add this line


Re: Need Help on my command /leavedm - lyrics - 14.08.2011

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
pawn Код:
if(GetPVarInt(playerid, "InDm") == 0) return SendClientMessage(playerid, -1, "You are not in the DM area");
Add this line
Thanks it work!
And Good Morning