GameTextForPlayer Doesn't work :/ - 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: GameTextForPlayer Doesn't work :/ (
/showthread.php?tid=248770)
GameTextForPlayer Doesn't work :/ -
anantanni - 15.04.2011
See
So i have made my script like if someone enters specific cars, which are rentable, it displays a message. But it doesnt work :S
This is in OnPlayerStateChange under PLAYER_STATE_DRIVER
pawn Code:
else if(newcar >= 203 && newcar <= 205)
{
if (HireCar[playerid] != newcar)
{
if(PlayerInfo[playerid][pCarkey] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[newcar]) {return 1;}
else
{
format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[1][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
VehAsk[playerid] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}
}
else if(newcar >= 194 && newcar <= 196)
{
if(PlayerInfo[playerid][pCarkey] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[newcar]) {return 1;}
else
{
format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[1][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
VehAsk[playerid] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}
else if(newcar >= 1 && newcar <= 9)
{
if (HireCar[playerid] != newcar)
{
if(PlayerInfo[playerid][pCarkey] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[newcar]) {return 1;}
else
{
format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[1][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
VehAsk[playerid] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}
}
else if(newcar >= 112 && newcar <= 130)
{
if (HireCar[playerid] != newcar)
{
if(PlayerInfo[playerid][pCarkey] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[newcar]) {return 1;}
else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[newcar]) {return 1;}
else
{
format(string, sizeof(string), "~w~You can Rent this bike~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentbike~w~~n~to get out type ~r~/exit",SBizzInfo[0][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
VehAsk[playerid] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}
}
No errors in compiling! but the text doesn't show in-game :S
Re: GameTextForPlayer Doesn't work :/ -
anantanni - 15.04.2011
Hello??!!!??!!?
Re: GameTextForPlayer Doesn't work :/ -
anantanni - 15.04.2011
People reply on other topics but not this!!
:/ :/ :/
Re: GameTextForPlayer Doesn't work :/ -
Anastasia - 15.04.2011
Put GameTextForPlayer under Format.
And try if it does!
Re: GameTextForPlayer Doesn't work :/ -
anantanni - 15.04.2011
@Anastasia - Doing.. Ill reply!
Re: GameTextForPlayer Doesn't work :/ -
admantis - 15.04.2011
1st reply: 07:37 PM
2nd reply: 07:49 PM
3rd reply: 08:03 PM
Funny how you expect alot of answers in less than thirty minutes, specially at this time. Be patient dude.