#include < a_samp > #include < dof2 > #define Vermelho 0xFF0000AA enum pVip { pVip, pVipLVL, pVipITime, pVipTime }; new vipInfo [ MAX_PLAYERS ] [ pVip ] ; public OnFilterScriptExit ( ) { DOF2_Exit ( ) ; return 1 ; } public OnPlayerConnect ( playerid ) { new pname[MAX_PLAYER_NAME], file2[128]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(file2, sizeof(file2), PASTA_CONTAS, pname); new pVip = DOF2_GetInt(file2, "VIP"); if(pVip == 1) { vipInfo[playerid][pVipITime] = DOF2_GetInt(file2, "VIPTime"); new TimeNow = gettime(); if(TimeNow < vipInfo[playerid][pVipITime]) { DOF2_SetInt(file2, "VIP", 0); SendClientMessage(playerid, -1, "Acabo seu vip!"); } } return 1 ; } public OnPlayerCommandText ( playerid, cmdtext [ ] ) { new cmd [ 128 ], idx ; cmd = strtok ( cmdtext, idx ) ; if(strcmp(cmd, "/setvip", true) == 0) { new aname[MAX_PLAYER_NAME], file[128]; GetPlayerName(playerid, aname, MAX_PLAYER_NAME); format(file, sizeof(file), PASTA_CONTAS, aname); if(IsPlayerAdmin(playerid)) { new tmp[256]; new plid; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "** Digite: /setvip [id]"); plid = strval(tmp); if(IsPlayerConnected(plid)) { new pname[MAX_PLAYER_NAME], file2[128]; GetPlayerName(plid, pname, MAX_PLAYER_NAME); format(file2, sizeof(file2), PASTA_CONTAS, pname); DOF2_SetInt(file2, "VIP", 1); DOF2_SetInt(file2, "Combustivel",2000); DOF2_SetInt(file2,"Jetpack", 1); DOF2_SetInt(file2,"Capacete2", 1); DOF2_SetInt(file2,"Capacete3", 1); DOF2_SetInt(file2,"Capacete4", 1); DOF2_SetInt(file2,"Capacete5", 1); SendClientMessage(playerid, 0x00FF00AA, "* VIP Setado com sucesso"); vipInfo[playerid][pVipITime] = gettime(); vipInfo[playerid][pVipITime] = vipInfo[playerid][pVipITime] + 2592000000; DOF2_SetInt(file2,"VIPTime", vipInfo[playerid][pVipITime]); new string[128]; format(string, sizeof(string), "| INFO | O Administrador %s (%d) te setou vip.", aname, playerid); SendClientMessage(plid, Vermelho, string); } else { SendClientMessage(playerid, Vermelho, "**ID invбlido"); } } return 1 ; } return 1 ; } 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; }
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(26) : error: 017: undefined symbol "PASTA_CONTAS"
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(27) : warning: 219: local variable "pVip" shadows a variable at a preceding level
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(29) : warning: 213: tag mismatch
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(29) : warning: 205: redundant code: constant expression is zero
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(27) : warning: 204: symbol is assigned a value that is never used: "pVip"
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(51) : error: 017: undefined symbol "PASTA_CONTAS"
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(64) : error: 017: undefined symbol "PASTA_CONTAS"
#define PASTA_CONTAS "/NOMEDAPASTADECONTAS/%s.ini"
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\Sem tнtulo 1.pwn(29) : warning: 219: local variable "pVip" shadows a variable at a preceding level
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\Sem tнtulo 1.pwn(31) : warning: 213: tag mismatch
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\Sem tнtulo 1.pwn(31) : warning: 205: redundant code: constant expression is zero
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\Sem tнtulo 1.pwn(29) : warning: 204: symbol is assigned a value that is never used: "pVip"
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\Sem tнtulo 1.pwn(80) : error: 017: undefined symbol "LARANJA"
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\Sem tнtulo 1.pwn(80) : error: 017: undefined symbol "LARANJA"
#define LARANJA 0xFFFFFFF // (Coloca a cor Laranja ali)
Tenta Definir O PASTA_CONTAS Tipo assim \/
PHP код:
|
//Dentro da pasta scriptfiles
#define "Contas/%s.ini"
//ou fora da pasta scriptfiles
#define "../PastaRaiz/%s.ini"