A quick help
#1

I have this code to check if the vehicle is of the owner:

pawn Код:
foreach(new i : PrivateVehicles[playerid])
{
if(!strcmp(vInfo[i][vehOwner], ReturnPlayerName(playerid)))
//This vehicle is yours
}
}
It works perfectly but i've a "problem". Is there a way to shorten this?

Since i have some vehicle related commands restriced only for vehicle owners, it's damn ugly and stupid write everytime this long code to check it.

I wanna do something like:

if(VehicleOwner(playerid) return "You're owner of this vehicle".

Hope i was clear, thanks.
Reply


Messages In This Thread
A quick help - by SymonClash - 11.02.2019, 21:24
Re: A quick help - by AhmedMohamed - 11.02.2019, 23:00
Re: A quick help - by Pottus - 11.02.2019, 23:15
Re: A quick help - by AhmedMohamed - 11.02.2019, 23:22
Re: A quick help - by Thundey - 12.02.2019, 00:05
Re: A quick help - by SymonClash - 12.02.2019, 00:17
Re: A quick help - by SymonClash - 12.02.2019, 13:52

Forum Jump:


Users browsing this thread: 2 Guest(s)