02.10.2011, 12:25
I'm having a bit of trouble.
I have this stock made by Jeffrey:
I need to detect if it returned -1...
I've tried multiple things before requesting help.
I tried:
( setcar being new setcar = GetCarIDFromPlayer_Enum(playerid); )
But none of them have worked. So basically I wanna ask if setcar returned -1 do this, else do that.
I have this stock made by Jeffrey:
pawn Код:
stock GetCarIDFromPlayer_Enum(playerid)
{
for(new i=0; i<sizeof(CarInfo); i++)
{
if(!strcmp(CarInfo[i][vOwner], PlayerName(playerid))) return i; //Returns the ID of the Ownership
}
return -1;
}
I've tried multiple things before requesting help.
I tried:
Код:
if(setcar == -1)
Код:
if(!setcar)
But none of them have worked. So basically I wanna ask if setcar returned -1 do this, else do that.