14.05.2011, 01:13
eu testei e da isso
E esse й o fs.
Код:
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.
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;
}