04.02.2013, 04:13
Quero este comando para setar vip e acabar depois de 30 dias. /SetVip
Eu jб tenho uma base aqui, sу que estб com alguns erros, ajuda ai mano
Eu jб tenho uma base aqui, sу que estб com alguns erros, ajuda ai mano
Код:
#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; }
Код HTML:
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(26) : error: 017: undefined symbol "PASTA_CONTAS"
Код HTML:
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
Код HTML:
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(29) : warning: 213: tag mismatch
Код HTML:
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(29) : warning: 205: redundant code: constant expression is zero
Код HTML:
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"
Код HTML:
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(51) : error: 017: undefined symbol "PASTA_CONTAS"
Код HTML:
C:\Users\Alisson\Desktop\Alisson Gindri\Servidor SAMP\BAV Server\filterscripts\sdddd.pwn(64) : error: 017: undefined symbol "PASTA_CONTAS"