14.08.2012, 21:56
Idem, nem reparei...
Novos erritos. Foi sу adicionar o /radio sugerir que me aparece erros...
Erros:
Cуdigo:
EDIT: Queria ajuda com um sistema para fazer Sniper matar com um tiro sу...
Novos erritos. Foi sу adicionar o /radio sugerir que me aparece erros...
Erros:
Код:
C:\Users\Shum\Desktop\radio.pwn(102) : error 017: undefined symbol "strtok" C:\Users\Shum\Desktop\radio.pwn(102) : error 033: array must be indexed (variable "tmp") C:\Users\Shum\Desktop\radio.pwn(106) : error 079: inconsistent return types (array & non-array) C:\Users\Shum\Desktop\radio.pwn(170) : error 017: undefined symbol "strrest" C:\Users\Shum\Desktop\radio.pwn(170) : error 033: array must be indexed (variable "tmp") C:\Users\Shum\Desktop\radio.pwn(172) : warning 217: loose indentation C:\Users\Shum\Desktop\radio.pwn(174) : error 017: undefined symbol "string" C:\Users\Shum\Desktop\radio.pwn(174) : error 017: undefined symbol "string" C:\Users\Shum\Desktop\radio.pwn(174) : error 029: invalid expression, assumed zero C:\Users\Shum\Desktop\radio.pwn(174) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors.
pawn Код:
#define FILTERSCRIPT
#define AM 0x00FF00
#define AX 0xFF0000
#define AY 0x0000FF
#define AN 0x000000
//#define AA
//#pragma unused a
#pragma tabsize 0
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <morphinc>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n|--------------------------------------|");
print("| Utilidades SA-MP by MakeZero_TL |");
print("| ~> FS Carregado <~ |");
print("|----------------------------------------|");
return 1;
}
public OnFilterScriptExit()
{
print("\n|------------------------------------|");
print("| Utilidades SA-MP by MakeZero_TL |");
print("| ~> FS Descarregado <~ |");
print("|--------------------------------------|");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
//new string[556];
new cmd[256];
new tmp[256];
new idx;
//new texto;
//new nome[MAX_PLAYER_NAME];
//new Str[128];
//new id;
//sscanf2
//------------------------------------------------------
if(strcmp(cmd, "/rotacionar1", true) == 0 || strcmp(cmd, "/rt1", true) ==0)
{
if(!IsPlayerAdmin(playerid))
{
SetGameModeText("[TL] Brasil Trinity Life v2.5a");
}
else
{
SendClientMessage(playerid, AM, "Vocк nгo й ADM Rcon");
SendClientMessageToAll(AX, "%s tentou mudar o nome do servidor via '/rt1' ");
}
}
//------------------------------------------------------
if(strcmp(cmd, "/rotacionar2", true)== 0 || strcmp(cmd, "/rt2", true) ==0)
{
if(!IsPlayerAdmin(playerid))
{
SetGameModeText("[TL] Trinity Life v2.5a - Vagas de Admin");
}
else
{
SendClientMessage(playerid, AM, "Vocк nгo й ADM Rcon");
SendClientMessageToAll(AX, "%s tentou mudar o nome do servidor via '/rt2'");
}
}
if(strcmp(cmd, "/rotacionar3", true) == 0 || strcmp(cmd, "/rt3", true) ==0)
{
if(!IsPlayerAdmin(playerid))
{
SetGameModeText("[TL] Trinity Life v2.5a - Vagas de Lнder");
}
else
{
SendClientMessageToAll(AX, "%s tentou mudar o nome do servidor via '/rt2'");
}
}
if(strcmp(cmd, "/antiroubo", true) == 0 || strcmp(cmd, "/btlar", true) == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name, "MakeZero_TL", true)==0 || strcmp(name, "william_lt", true) ==0 || strcmp(name, "Drift_Patrick", true) ==0)
{
SetGameModeText("Servidor roubado! Procure o oficial! Trinity Life OWNA");
}
else
{
SendClientMessageToAll(AY, "%s tentou mudar o nome do servidor");
}
}
if(strcmp(cmd, "/radio", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, AM, "Digite '/radio ajuda' para ver os comandos");
return 1;
}
}
if(strcmp(tmp, "ajuda", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, AY, "*_____________________Sistema de Rбdio_________________________*");
SendClientMessage(playerid, AX, "| Digite '/radio lista' para listar as radios |");
SendClientMessage(playerid, AX, "| Digite '/radio tocar [id]' para tocar a radio selecionada |");
SendClientMessage(playerid, AX, "| Digite '/radio parar' para parar de tocar uma rбdio |");
SendClientMessage(playerid, AX, "| Digite '/radio sugerir' para sugerir uma rбdio |");
SendClientMessage(playerid, AY, "*______________________________________________________________*");
}
else
{
SendClientMessage(playerid, AY, "*__________________________Sistema de Rбdio________________________*");
SendClientMessage(playerid, AX, "| Digite '/radio sugerir' para sugerir uma rбdio |");
SendClientMessage(playerid, AX, "| O resto dos comandos podem ser utilizados apenas em um carro |");
SendClientMessage(playerid, AY, "*__________________________________________________________________*");
}
}
if(strcmp(tmp, "lista", true) ==0)
{
SendClientMessage(playerid, AY, "*_____________________Sistema de Rбdio_________________________*");
SendClientMessage(playerid, AM, "| 1 - Rбdio Fusion |");
SendClientMessage(playerid, AM, "| 2 - Rбdio Hunter |");
SendClientMessage(playerid, AY, "*______________________________________________________________*");
}
if(strcmp(tmp, "tocar", true) ==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, AY, "*_____________________Sistema de Rбdio_________________________*");
SendClientMessage(playerid, AM, "| 1 - Rбdio Fusion |");
SendClientMessage(playerid, AM, "| 2 - Rбdio Mix |");
SendClientMessage(playerid, AY, "*______________________________________________________________*");
}
else
{
SendClientMessage(playerid, AN, "*____________________Sistema de Rбdio____________________*\n");
SendClientMessage(playerid, AM, "| Vocк nгo estб em um carro. |");
SendClientMessage(playerid, AN, "*_________________________________________________________*");
}
}
if(strcmp(tmp, "tocar 1", true) ==0)
{
PlayAudioStreamForPlayer(playerid, "http://radiofusion.com.br/fusion.asx");
SendClientMessage(playerid, AM, "Tocando agora: Rбdio Fusion");
}
if(strcmp(tmp, "tocar 2", true) ==0)
{
PlayAudioStreamForPlayer(playerid, "http://www.radiohunter.com.br/master/tocadores/mediaplayer/hdfont.asx");
SendClientMessage(playerid, AM, "Tocando agora: Rбdio Hunter");
}
/*if(strcmp(tmp, "sugerir", true) ==0)
{
}*/
if(strcmp(tmp, "sugerir", true) == 0)
{
tmp = strrest(cmdtext,idx);
if(!strlen(tmp)) SendClientMessage(playerid, AX, "Use: /radio sugerir [nome]");
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerAdmin(i)){
format(string, sizeof(string), "~> Sistema de Rбdio <~ %s sugeriu: %s", PlayerName(playerid), tmp);
SendClientMessage(i, AM, string);
SendClientMessage(playerid, AM, "Sua sugestгo foi enviada com sucesso aos admins!");
}
return 1;
}
strtok(string[],&idx,seperator = ' ')
{
new ret[128], i = 0, len = strlen(string);
while(string[idx] == seperator && idx < len) idx++;
while(string[idx] != seperator && idx < len)
{
ret[i] = string[idx];
i++;
idx++;
}
while(string[idx] == seperator && idx < len) idx++;
return ret;
}
#endif