public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz,Float:vehz_rot;
GetVehiclePos(currentveh, vehx, vehy, vehz);
CreateObject(18648,vehx , vehy, vehz, vehz_rot);
}
}
return 1;
}
CreateObject(18648,vehx , vehy, vehz, vehz_rot);
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz,Float:vehz_rot;
GetXYInFrontOfPlayer(playerid,vehx,vehy,5);
CreateObject(18648,vehx , vehy, vehz, vehz_rot);
}
}
return 1;
}
CreateObject(18648,vehx , vehy, vehz, vehz_rot);
CreateObject(modelif,X,Y,Z,rX,rY,rZ,Float:DrawDistance = 0.0)
C:\Users\Warkadang\Desktop\Scripting\Scripting\gamemodes\Derby.pwn(201) : warning 202: number of arguments does not match definition C:\Users\Warkadang\Desktop\Scripting\Scripting\gamemodes\Derby.pwn(201) : warning 202: number of arguments does not match definition C:\Users\Warkadang\Desktop\Scripting\Scripting\gamemodes\Derby.pwn(198) : warning 204: symbol is assigned a value that is never used: "currentveh" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase Header size: 1568 bytes Code size: 2756 bytes Data size: 520 bytes Stack/heap size: 16384 bytes; estimated max. usage=28 cells (112 bytes) Total requirements: 21228 bytes 3 Warnings.
It does not matter,I also have a script having these warnings but they work fine.
|
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:vehx, Float:vehy, Float:vehz,Float:vehz_rot;
GetXYInFrontOfPlayer(playerid,vehx,vehy,5);
CreateObject(18648,vehx , vehy, vehz, vehz_rot,0,0,0);
}
}
return 1;
}