strcmp function ! help me!
#2

You first need to close with ")" so strcmp will return a value and then compare if it's equal to 0.
pawn Код:
strcmp(VehicleInfo[i][vOwner],playername) == 0
Note that if VehicleInfo[i][vOwner] is null/empty, it will return false. You can use isnull macro and check if it's not null and then compare to the player's name.

You don't need an array so you know if a vehicle is created or not. If the vehicle doesn't exist, GetVehicleModel returns 0 and there's a native as well which called IsValidVehicle (not defined so you should add it yourself).
Reply


Messages In This Thread
strcmp function ! help me! [SOLVED] - by superrobot48 - 06.05.2014, 09:36
Re: strcmp function ! help me! - by Konstantinos - 06.05.2014, 09:42
Re: strcmp function ! help me! - by superrobot48 - 06.05.2014, 10:15
Re: strcmp function ! help me! - by superrobot48 - 06.05.2014, 11:17
Re: strcmp function ! help me! - by Konstantinos - 06.05.2014, 11:21
Re: strcmp function ! help me! - by superrobot48 - 06.05.2014, 11:26
Re: strcmp function ! help me! - by Konstantinos - 06.05.2014, 11:30
Re: strcmp function ! help me! - by superrobot48 - 06.05.2014, 11:38
Re: strcmp function ! help me! - by Konstantinos - 06.05.2014, 11:41
Re: strcmp function ! help me! - by superrobot48 - 06.05.2014, 11:44

Forum Jump:


Users browsing this thread: 1 Guest(s)