13.10.2013, 19:38
(
Последний раз редактировалось Extremmo; 13.10.2013 в 20:10.
)
Quote:
C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(43) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(56) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(92) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(97) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(9 : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(103) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(104) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(109) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(110) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(115) : warning 217: loose indentation C:\Documents and Settings\Lanterna Negra\Desktop\0\filterscripts\sss.pwn(142) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Warnings. |
PHP код:
#include <a_samp>
#define FILTERSCRIPT
new carroagora;
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;
}
public OnFilterScriptInit()
{
print("\n----------------------------------");
print(" Vehicle Creator by Wesley");
print("-----------------------------------\n");
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0xFF0000AA, "Vehicle Creator by KevinsL Loaded!");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx, tmp[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/criarveiculo", true)==0 || strcmp(cmd, "/cv", true)==0 || strcmp(cmd, "/criarv", true)==0)
{
new modelo, cor1, cor2;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, 0xFF0000AA, "[ERRO]: /criarveiculo [modelo] [cor 1] [cor 2]");
return 1;
}
modelo = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFF0000AA, "[ERRO]: /criarveiculo [modelo] [cor 1] [cor 2]");
return 1;
}
cor1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFF0000AA, "[ERRO]: /criarveiculo [modelo] [cor 1] [cor 2]");
return 1;
}
cor2 = strval(tmp);
if(modelo >= 400 && modelo <= 611)
{
new stringsalvo[256];
new Float:X, Float:Y, Float:Z, Float:Rotation;
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInAnyVehicle(playerid))
{
carroagora = GetPlayerVehicleID(playerid);
GetVehicleZAngle(carroagora, Rotation);
}
else
{
GetPlayerFacingAngle(playerid, Rotation);
}
new File:pos=fopen("carros.txt", io_append);
format(stringsalvo, 256, "AddStaticVehicleEx(%d,%f,%f,%f,%f,%d,%d,600000); \n", modelo, X, Y, Z,Rotation,cor1,cor2);
fwrite(pos, stringsalvo);
print(stringsalvo);
SendClientMessage(playerid, 0xFF0000AA, stringsalvo);
fclose(pos);
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[ERRO]: Somente veiculos de 400 a 611!");
}
return 1;
}
if(strcmp(cmdtext, "/ajudavc", true)==0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Use: /criarveiculo [modelo] [cor 1] [cor 2] e crie um veiculo onde vocк estб! o arquivo serб salvo na pasta: scriptfiles");
return 1;
}
return 0;
}