Ayuda para compilar esto
#1

Hola muy buenas estes es mi primer post, hoy tengo un problemilla a la hora de compilar un Filterscript y esque de da crash al compilarlo este es el filterscript aver si podeis compilarlo vosotros.






if (strcmp("/s", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, GREEN, "Saved position. For return to your saved position type /r");
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
GetVehiclePos(VehicleID, posx[playerid], posy[playerid], posz[playerid]);
GetVehicleZAngle(VehicleID, zangle[playerid]);
} else {
GetPlayerPos(playerid, posx[playerid], posy[playerid], posz[playerid]);
GetPlayerFacingAngle(playerid, zangle[playerid]);
}
return 1;
}

if (strcmp("/r", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, GREEN, "You are returned to your saved position.");
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID, posx[playerid], posy[playerid], posz[playerid]);
SetVehicleZAngle(VehicleID, zangle[playerid]);
}
else
{
SetPlayerPos(playerid, posx[playerid], posy[playerid], posz[playerid]);
SetPlayerFacingAngle(playerid, zangle[playerid]);
}
return 1;
}
Reply
#2

pawn Код:
#include <a_samp>

new Float:ppos[MAX_PLAYERS][4];
new Float:vpos[MAX_VEHICLES][4];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/s", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, -1, "Saved position. For return to your saved position type /r");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            GetVehiclePos(vehicleid, vpos[vehicleid][0],vpos[vehicleid][1], vpos[vehicleid][2]);
            GetVehicleZAngle(vehicleid, vpos[vehicleid][3]);
        }
        else
        {
            GetPlayerPos(playerid, ppos[playerid][0],ppos[playerid][1], ppos[playerid][2]);
            GetPlayerFacingAngle(playerid, ppos[playerid][3]);
        }
        return 1;
    }
   
    if (strcmp("/r", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, -1, "You are returned to your saved position.");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            SetVehiclePos(vehicleid, vpos[vehicleid][0],vpos[vehicleid][1], vpos[vehicleid][2]);
            SetVehicleZAngle(vehicleid, vpos[playerid][3]);
        }
        else
        {
            SetPlayerPos(playerid, ppos[playerid][0],ppos[playerid][1], ppos[playerid][2]);
            SetPlayerFacingAngle(playerid, ppos[playerid][3]);
        }
        return 1;
    }
   
    return 0;
}
Reply
#3

Muchas gracias no me dio ningun problema ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)