problem with onplayerstatechange
#3

Quote:
Originally Posted by dlegend
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  new PlayerName[24];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));

  if(newstate == PLAYER_STATE_DRIVER)
  {
   new Vehicle = GetPlayerVehicleID(playerid);
   if(Vehicle == dlegend)
   {
     if(strcmp(PlayerName,"dlegend",true))
     {
      RemovePlayerFromVehicle(playerid);
      SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for dlegend");
     }
   }
  }

		switch(newstate) {
			case PLAYER_STATE_ONFOOT: {
				switch(oldstate) {
					case PLAYER_STATE_DRIVER: OnPlayerExitVehicle(playerid,255);
					case PLAYER_STATE_PASSENGER: OnPlayerExitVehicle(playerid,255);
				}
			}
		}
   }
  return 1;
}

#endif
the proplem is on that last return
Desktop\pTc 0.3x offical\gamemodes\pTc0.1x.pwn(9785) : error 010: invalid function or declaration
Is the error on his line?

if(strcmp(PlayerName,"dlegend",true))
Reply


Messages In This Thread
problem with onplayerstatechange - by [HKS]dlegend - 13.11.2009, 01:10
Re: problem with onplayerstatechange - by [HKS]dlegend - 13.11.2009, 01:26
Re: problem with onplayerstatechange - by Tigerbeast11 - 13.11.2009, 06:33
Re: problem with onplayerstatechange - by [HKS]dlegend - 14.11.2009, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)