How to get the the race name?
#1

Could anyone tell me how to get the race name and form a command like this:

pawn Код:
if(AirRaceI[CurrentAirRace][Name] == AirRace1)
Reply
#2

You have to use strcmp to compare to strings together.
Reply
#3

Example please, if you can.
Reply
#4

Quote:
Originally Posted by 0ne
Example please, if you can.
Код:
if(!strcmp(AirRaceI[CurrentAirRace][Name], "AirRace1", false))
No offense, but you're going to have a difficult time modding a race script if you dont even know how to compare strings to each other. Best of luck to you though .
Reply
#5

I already done the script except for getting it's name and putting in right vehicles, thats all.

Just tested the code works very good! Thank you for the fast answers mate. :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)