Car System Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car System Problem (
/showthread.php?tid=357754)
Car System Problem -
lordturhan - 08.07.2012
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);
}
}
}
}
}
This is not working i wonder why its not working.Can anybody help me with it.
Re: Car System Problem -
lordturhan - 08.07.2012
Sorry for double post.
Forgot to post the problem.
When you get in the vehicle it isn't saying Vehicle Owned by Another player.