Pawn problems
#6

My script is only 600 lines, here you about 50 of them that i changed.

Код:
 #include <a_samp>
#include <core>
#include <float>
#include <dini>

#pragma tabsize 0

//----------------------------------------------------------

#define USERFILE "users.txt"
#define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1
#define COLOR_WHITE 		0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFFFFFFF
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

new Tick[MAX_PLAYERS];

public OnPlayerUpdate(playerid)
{
	Tick[playerid]++;
	if(Tick[playerid] != 3) return 1;
	Tick[playerid] = 0;
 	new Keys,up,down;
       	GetPlayerKeys(playerid,Keys,up,down);
	new Float:x,Float:y,Float:z;
	if(Keys &= 1024)
	{
   		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
		{

			GetPlayerVelocity(playerid,x,y,z);
			SetPlayerVelocity(playerid,x*1.2,y*1.2,z*1.2);
		}
	}
 	else if(Keys &= 4)
      	{
        	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
			GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
			SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);
		}
	}
	return 1;
}

new total_vehicles_from_files=0;

// Class selection globals
new gPlayerCitySelection[MAX_PLAYERS];
new gPlayerHasCitySelected[MAX_PLAYERS];
new gPlayerLastCitySelectionTick[MAX_PLAYERS];

new Text:txtClassSelHelper;
new Text:txtLosSantos;
new Text:txtSanFierro;
new Text:txtLasVenturas;

new thisanimid=0;
new lastanimid=0;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys
	{
        new Float:x, Float:y, Float:z;
	GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
	SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
	}
	return 1;
}
Reply


Messages In This Thread
Pawn problems - by Sweez - 23.01.2013, 17:24
Re: Pawn problems - by Private200 - 23.01.2013, 17:28
Re: Pawn problems - by Sweez - 23.01.2013, 17:32
Re: Pawn problems - by Sweez - 23.01.2013, 17:45
Re: Pawn problems - by Private200 - 23.01.2013, 17:48
Re: Pawn problems - by Sweez - 23.01.2013, 17:53
Re: Pawn problems - by DaRk_RaiN - 23.01.2013, 17:59
Re: Pawn problems - by Private200 - 23.01.2013, 17:59
Re: Pawn problems - by Sweez - 23.01.2013, 18:01
Re: Pawn problems - by Private200 - 23.01.2013, 18:02

Forum Jump:


Users browsing this thread: 6 Guest(s)