help with premium system! :(
#1

Hey, making premium system and i got problem.i have premium.pwn and there is everything what there should be.
but in my gamemode[zombiepanic.pwn] i have one PREMIUM code.



Код:
new PREMIUM[MAX_PLAYERS];



Код:
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 457 || GetVehicleModel(vehicleid) == 530 || GetVehicleModel(vehicleid) == 574)
	{
	if(PREMIUM[playerid] == 0) GameTextForPlayer(playerid, "~w~Only ~r~Premium ~b~Players ~w~Can Use This Car.", 3000, 3);
	if(PREMIUM[playerid] == 0) RemovePlayerFromVehicle(playerid);
	if(PREMIUM[playerid] == 0) return 0;
    if(PlayerTeam[playerid] == 0)
	{
       SendClientMessage(playerid, COLOR_PURPLE, "You have entered to PREMIUM players car.");
       GameTextForPlayer(playerid, "~g~You have entered to ~r~Premium ~b~Players ~g~car.", 3000, 3);
	}
	else if(PlayerTeam[playerid] == 1)
	{
		       RemovePlayerFromVehicle(playerid);
               SendClientMessage(playerid, COLOR_RED, "Brains....No brains heeere....");
               GameTextForPlayer(playerid, "~r~Brains....No brains heeere....", 3000, 3);
    	}
	}
problem is that it doesnt matter if my PREMIUM is 0 or 1, when i goto any of those cars it just says: "only premium players can use this car".
Reply
#2

sorry for double post, put ask if u need any other information etc.
Reply
#3

It has nothing to do with your problem, but you can better use this (it migth even fix it)

pawn Код:
if(PREMIUM[playerid] == 0)//or you can use if(PREMIUM[playerid] != 1)
{
    GameTextForPlayer(playerid, "~w~Only ~r~Premium ~b~Players ~w~Can Use This Car.", 3000, 3);
    RemovePlayerFromVehicle(playerid);
    return 1;
}
Reply
#4

well anyway, how i can fix my problem?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)