[AJUDA] /sp e /ip
#6

eu testei e da isso

Код:
C:\Users\Gabriel\Desktop\area2\sv\filterscripts\sp.pwn(65) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
E esse й o fs.
pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

new Float:Lugar[3];
new xyz[MAX_PLAYERS];
new Int;

public OnPlayerConnect(playerid)
{
    xyz[playerid] = 0;
    return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
    new idx;
    new cmd[256];
    new cmd = strtok(cmdtext,idx);
    if(strcmp(cmd,"/sp",true))
    {
        Int = GetPlayerInterior(playerid);
        GetPlayerPos(playerid,Lugar[0],Lugar[1],Lugar[2]);
        SendClientMessage(playerid,0xFFF55CFF,"Coordenadas salvas. Digite /ip para ir atй o local marcado.");
        xyz[playerid] = 1;
        return 1;
    }
    if(strcmp(cmd,"/ip",true))
    {
        if(xyz[playerid] == 0) return SendClientMessage(playerid,0xFFF55CFF,"Nenhuma coordenada foi salva atй agora.");
        SetPlayerInterior(playerid,Int);
        SetPlayerPos(playerid,Lugar[0],Lugar[1],Lugar[2]);
        if(IsPlayerInAnyVehicle(playerid))
        {
            new carid = GetPlayerVehicleID(playerid);
            SetVehiclePos(carid,Lugar[0],Lugar[1],Lugar[2]);
            PutPlayerInVehicle(playerid,carid);
            return 1;
        }
        SendClientMessage(playerid,0xFFF55CFF,"Vocк retornou ao local salvo.");
        return 1;
    }
    return 0;
}

//CASO VOCК NГO TENHA strtok, ADICONE ISTO NO FINAL DO SEU GM:

strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply


Messages In This Thread
[AJUDA] /sp e /ip - by DPS|NeW| - 14.05.2011, 00:43
Re: [AJUDA] /sp e /ip - by Shadoww5 - 14.05.2011, 00:50
Re: [AJUDA] /sp e /ip - by Macintosh - 14.05.2011, 00:56
Re: [AJUDA] /sp e /ip - by DPS|NeW| - 14.05.2011, 01:08
Re: [AJUDA] /sp e /ip - by Shadoww5 - 14.05.2011, 01:10
Re: [AJUDA] /sp e /ip - by DPS|NeW| - 14.05.2011, 01:13
Re: [AJUDA] /sp e /ip - by Shadoww5 - 14.05.2011, 01:14
Re: [AJUDA] /sp e /ip - by TiagoPS - 14.05.2011, 01:36

Forum Jump:


Users browsing this thread: 1 Guest(s)