problem with onplayerstatechange
#1


#endif
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new string[128];
	new plname[24];
	new plveh = GetPlayerVehicleID(playerid);

		 switch(newstate) {
			case PLAYER_STATE_ONFOOT: {
				switch(oldstate) {
					case PLAYER_STATE_DRIVER: OnPlayerExitVehicle(playerid,255);
					case PLAYER_STATE_PASSENGER: OnPlayerExitVehicle(playerid,255);
				}
			}
		}
		return 1;
	}
	
	if(newstate == PLAYER_STATE_DRIVER)
 		{
		if(plveh == Vehname[0])
			{
			GetPlayerName(playerid, plname, 24);
   			if(strcmp(PlayerName, "dlegend", true) == 0)
      		{
      			SendPlayerFormattedText(playerid, 0xFFFF00AA,"Welcome to your Car dlegend");
      		}
      		else
      		{

						format(string, sizeof(string), "** Alarm bip bip bip **");
    				ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				SendPlayerFormattedText(playerid, 0xFFFF00AA, "This car is for dlegend only ! ! !");
				RemovePlayerFromVehicle(playerid);
			}
		}
	//	else if(plveh == Vehname[1])
	//	{
			///////// code here same as above only with a different name in place of yours
	//	}
		return 1;
	}
	return 1;

#endif
dont see wats rong with it
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)