if(strcmp(cmdtext, "/flip", true) == 0)
{
new Float:X, Float:Y, Float:Z;
if(IsPlayerInAnyVehicle(playerid))
{
SetCameraBehindPlayer(playerid);
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
}
return 1;
}
if (!strcmp("/reparar", cmdtext))
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, -1 "Seu Veiculo Foi Reparado!");
}
else SendClientMessage(playerid,-1, "Voce nao estб no veiculo!");
return 1;
}
if(!strcmp("/nitro",cmdtext))
{
if(IsPlayerInAnyVehicle(playerid)) return NitroInfinito(playerid);
else SendClientMessage(playerid,-1,"Vocк nгo esta em um veiculo");
}
forward NitroInfinito(playerid);
public NitroInfinito(playerid)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
SetTimerEx("NitroInfinito",10000,0,"i",playerid);
return 0;
}
#include <a_samp>
#define COLOR_ZIELONY 0xFF00FF
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(Nitro(vehicleid))
{
AddVehicleComponent(vehicleid, 1010);
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
new nos = GetPlayerVehicleID(playerid);
if(Nitro(nos) && (oldkeys & 1 || oldkeys & 4))
{
RemoveVehicleComponent(nos, 1010);
AddVehicleComponent(nos, 1010);
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_ZIELONY, "Server using 'Need For Speed Nitro' By Ekwador");
return 0;
}
stock Nitro(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case
444, 581, 586, 481, 509, 446, 556, 443, 452, 453, 454, 472,
473, 484, 493, 495, 462, 463, 468, 521, 522, 417, 425, 447,
488, 497, 501, 548, 563, 406, 520, 539, 553, 557, 573, 460,
464, 476, 511, 512, 577, 592, 471, 448, 461, 523, 510, 487,
430, 465, 469, 513, 593, 419:
return false ;
}
return true ;
}
#include <a_samp>
public OnGameModeInit()
{
SetTimer("Reparar", 1000, true);
return 1;
}
forward Reparar(playerid);
public Reparar(playerid)
{
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}
1Є Nitro Infinito -
pawn Код:
2Є auto - reparar: pawn Код:
Espero ter ajudado vocк *-* |
C:\Documents and Settings\Escolas\Desktop\gamemodes\Drift.pwn(104) : error 017: undefined symbol "Nitro"
C:\Documents and Settings\Escolas\Desktop\gamemodes\Drift.pwn(202) : error 017: undefined symbol "Nitro"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
stock Nitro(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case
444, 581, 586, 481, 509, 446, 556, 443, 452, 453, 454, 472,
473, 484, 493, 495, 462, 463, 468, 521, 522, 417, 425, 447,
488, 497, 501, 548, 563, 406, 520, 539, 553, 557, 573, 460,
464, 476, 511, 512, 577, 592, 471, 448, 461, 523, 510, 487,
430, 465, 469, 513, 593, 419:
return false ;
}
return true ;
}