Need Help on my command /leavedm
#1

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
Reply
#2

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

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

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.
Reply
#5

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
Reply
#6

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

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)