Trying to make a toggle phone system
#1

This is how I did it.

pawn Код:
// on top
new power;

//OnPlayerConnect
power = 0;

// Making command now

    CMD:poweron(playerid,params[])
    {
        if(PlayerInfo[playerid][Cell]<=1)return SendClientMessage(playerid, COLOR_GREY, "You don't own a cellphone.");
        if(power == 1){
        SendClientMessage(playerid,COLOR_GREY,"Your phone is already on.");
        }
        else{
        power == 1;
        SendClientMessage(playerid,COLOR_WHITE,"You have turned your phone's power on.");
        }
        return 1;

    }
If player doesn't have a cellphone it'll give him message. If the power is already on, it'll say "Your phone is already on." and if it's not it'll set power = 1 and give message that "You have turned your phone's power on." and every phone command like /call /text will check if the phone is on or not as above. But I get following warning. Seeking an effective help!

Код:
C:\Users\*******\*******\******\gamemodes\*****.pwn(1691) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Line 1691:
Код:
 power == 1;
Reply


Messages In This Thread
Trying to make a toggle phone system - by Goldilox - 08.06.2013, 19:53
Re: Trying to make a toggle phone system - by mastermax7777 - 08.06.2013, 19:54
Re: Trying to make a toggle phone system - by Goldilox - 08.06.2013, 19:56
Re: Trying to make a toggle phone system - by random123 - 08.06.2013, 20:06
Re: Trying to make a toggle phone system - by Goldilox - 08.06.2013, 20:53
Re: Trying to make a toggle phone system - by DobbysGamertag - 08.06.2013, 20:55
Re: Trying to make a toggle phone system - by Goldilox - 08.06.2013, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)