25.08.2011, 08:39
pawn Code:
public CheckOwner(playerid)
{
if(IsPlayerConnected(playerid))
{
for(new i = 1; i < sizeof(CarInfo); i++)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
if(strcmp(playername,CarInfo[i][vOwner],true)==0)
{
PlayerInfo[playerid][pVehicle] = 1;
return i;
}
else
{
PlayerInfo[playerid][pVehicle] = 0;
return i;
}
}
}
return 1;
}
pawn Code:
else if(strcmp(playername,CarInfo[i][vOwner],false)==0)
{
PlayerInfo[playerid][pVehicle] = 0;
return i;
}