Thanks that worked but now i have another problem.
This code:
pawn Код:
else if(strcmp(Lent[playerid], "Torran0", true) == 0)
Is stopping the script from doing this:
pawn Код:
RemovePlayerFromVehicle(playerid);
Heres the whole callback:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == Torran[0])
{
if(strcmp(GetName(playerid), "JoeTorran", true) == 0 || strcmp(Lent[playerid], "Torran0", true) == 0)
{
print(" ");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
else if(vehicleid == Torran[1])
{
if(strcmp(GetName(playerid), "JoeTorran", true) == 0 || strcmp(Lent[playerid], "Torran1", true) == 0)
{
print(" ");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
else if(vehicleid == Tik[0])
{
if(strcmp(GetName(playerid), "Tik", true) == 0 || strcmp(Lent[playerid], "Tik0", true) == 0)
{
print(" ");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
else if(vehicleid == Tik[1])
{
if(strcmp(GetName(playerid), "Tik", true) == 0 || strcmp(Lent[playerid], "Tik1", true) == 0)
{
print(" ");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
else if(vehicleid == Tik[2])
{
if(strcmp(GetName(playerid), "Tik", true) == 0 || strcmp(Lent[playerid], "Tik2", true) == 0)
{
print(" ");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}
Like if i try and enter Tik[0] with the name JoeTorran it dosent kick me out but it should,
does anyone know why?