Simple problem -.- again
#1

How to add in this script line:
Код:
if (GetPlayerScore(playerid)<5) return SendClientMessage(playerid, 0xFF9900AA,"You must have higher score to buy this weapon.");
this script:
Код:
TogglePlayerControllable(playerid,1);
So if "if(GetPlayerScore(playerid)<5)" is not true "TogglePlayerControllable(playerid,1);" happens.
Same like "SendClientMessage" script.
Reply
#2

Cant see any TogglePlayerControllable :\
Reply
#3

You mean
pawn Код:
if(!(GetPlayerScore(playerid) < 5))
{
    TogglePlayerControllable(playerid,true);
    SendClientMessage(playerid, 0xFF9900AA,"You must have higher score to buy this weapon.");
}
Reply
#4

-.- yes ty
Reply
#5

-.- no i failed, now if you have less than 5 score you can buy it...
now my script looks lke this:
Код:
        if(!(GetPlayerScore(playerid) < 5))
{
  		 TogglePlayerControllable(playerid,1);
   		 SendClientMessage(playerid, 0xFF9900AA,"You must have higher score to buy this weapon.");
}
        if(GetPlayerMoney(playerid)<100)return SendClientMessage(playerid, 0xFF9900AA,"You dont have enough money.");
       		GivePlayerMoney(playerid,-100);
       		GivePlayerWeapon(playerid, 22, 100);
            SendClientMessage(playerid, 0xFFFF00AA, "You bought a Pistol 9mm.");
            TogglePlayerControllable(playerid,1);
        }
Reply
#6

if(GetPlayerScore(playerid) < 5)
Reply
#7

would work probaly... i fixed it in other way
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)