Armour Help.
#1

When the armour health is 0 it will spawn back. I don`t know what is going on.

Код:
			}
			if(listitem == 17)
		 	{
		    	if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "ERROR: You don't have enough money to buy this weapon!");
          		SetPlayerArmour(playerid, 100);
				GivePlayerMoney(playerid,-5000);
			}

		}
Reply
#2

pawn Код:
SetPlayerArmour(playerid, 100.0); //Add .0 after whole number, it's a float.
GivePlayerMoney(playerid, -5000); //Must be at the same position with SetPlayerArmour
Reply
#3

Quote:
Originally Posted by LeeXian99
Посмотреть сообщение
pawn Код:
SetPlayerArmour(playerid, 100.0); //Add .0 after whole number, it's a float.
GivePlayerMoney(playerid, -5000); //Must be at the same position with SetPlayerArmour
ITs was 100.0 that`s why I tried to change it but still it breaks and comes back again.
Reply
#4

pawn Код:
}
            if(listitem == 17)
            {
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "ERROR: You don't have enough money to buy this weapon!");
                SetPlayerArmour(playerid, 100);
            GivePlayerMoney(playerid,-5000);
            }

        }
I don't know if you added ".0" after the whole number, but I fixed GivePlayerMoney for you, try to add .0 and restart your test server. If it's like that, I have no idea then.
Reply
#5

Quote:
Originally Posted by LeeXian99
Посмотреть сообщение
pawn Код:
}
            if(listitem == 17)
            {
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,0xFF0000AA, "ERROR: You don't have enough money to buy this weapon!");
                SetPlayerArmour(playerid, 100);
            GivePlayerMoney(playerid,-5000);
            }

        }
I don't know if you added ".0" after the whole number, but I fixed GivePlayerMoney for you, try to add .0 and restart your test server. If it's like that, I have no idea then.
Ok man Thank`s Can you help me with this code too?
Код:
GameTextForPlayer(playerid, "~n~~n~~n~~n~~r~No Deathmatching!", 100000, 3);
I want "No Deathmatching" To stay there and doesn`t fade away.
Reply
#6

Quote:
Originally Posted by ZizPower7610
Посмотреть сообщение
Ok man Thank`s Can you help me with this code too?
Код:
GameTextForPlayer(playerid, "~n~~n~~n~~n~~r~No Deathmatching!", 100000, 3);
I want "No Deathmatching" To stay there and doesn`t fade away.
Set the timer to so much seconds to prevent it from fading away
Reply
#7

Quote:
Originally Posted by Dzines4SAMP
Посмотреть сообщение
Set the timer to so much seconds to prevent it from fading away
Thank you All!
Reply
#8

pawn Код:
GameTextForPlayer(playerid, "~n~~n~~n~~n~~r~No Deathmatching!", 10000000000000000, 3);
1000ms = 1s
There, unlimited time. :X
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)