08.07.2012, 09:52
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < MAX_CARS;i++)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,24);
if(IsPlayerInVehicle(playerid,CInfo[i][CarID]))
{
if(CInfo[i][Owned] == 1 && strcmp(CInfo[i][Owner],pName) != 0)
{
SendClientMessage(playerid,-1,"You are not the owner of this car!");
ClearAnimations(playerid);
}
}
}
}
}