SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 15/04/2011, 07:37 PM   #1
anantanni
Big Clucker
 
anantanni's Avatar
 
Join Date: Dec 2010
Location: India
Posts: 144
Reputation: 0
Default GameTextForPlayer Doesn't work :/

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
__________________
anantanni is offline  
Old 15/04/2011, 07:49 PM   #2
anantanni
Big Clucker
 
anantanni's Avatar
 
Join Date: Dec 2010
Location: India
Posts: 144
Reputation: 0
Default Re: GameTextForPlayer Doesn't work :/

Hello??!!!??!!?
__________________
anantanni is offline  
Old 15/04/2011, 08:03 PM   #3
anantanni
Big Clucker
 
anantanni's Avatar
 
Join Date: Dec 2010
Location: India
Posts: 144
Reputation: 0
Default Re: GameTextForPlayer Doesn't work :/

People reply on other topics but not this!! :/ :/ :/
__________________
anantanni is offline  
Old 15/04/2011, 08:08 PM   #4
Anastasia
Little Clucker
 
Anastasia's Avatar
 
Join Date: Apr 2011
Posts: 23
Reputation: 0
Default Re: GameTextForPlayer Doesn't work :/

Put GameTextForPlayer under Format.

And try if it does!
Anastasia is offline  
Old 15/04/2011, 08:10 PM   #5
anantanni
Big Clucker
 
anantanni's Avatar
 
Join Date: Dec 2010
Location: India
Posts: 144
Reputation: 0
Default Re: GameTextForPlayer Doesn't work :/

@Anastasia - Doing.. Ill reply!
__________________
anantanni is offline  
Old 15/04/2011, 08:22 PM   #6
admantis
High-roller
 
Join Date: Sep 2009
Posts: 2,524
Reputation: 449
Default Re: GameTextForPlayer Doesn't work :/

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.
admantis is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GameTextForPlayer Omega90210 Scripting Help 3 19/10/2011 02:08 AM
[DUV]GameTextForPlayer riad12 Português/Portuguese 9 05/05/2010 06:00 AM
GameTextForPlayer doesn`t Work Manuel20 Help Archive 17 02/04/2010 03:13 PM


All times are GMT. The time now is 06:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.