help with premium system! :( - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with premium system! :( (
/showthread.php?tid=233719)
help with premium system! :( -
Randomai - 02.03.2011
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".
Re: help with premium system! :( -
Randomai - 02.03.2011
sorry for double post, put ask if u need any other information etc.
Re: help with premium system! :( -
alpha500delta - 02.03.2011
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;
}
Re: help with premium system! :( -
Randomai - 02.03.2011
well anyway, how i can fix my problem?