29.10.2012, 15:30
olб, eu sou Chainksain e estou com um problema grande aqui, na hora q eu vou compilar o GM, ele trava o compilador, isso acontece somente quando eu coloco qualquer um desses comandos no GM:
Sei que a chance de ser pura e simples falta de atenзгo й grande, ainda mais porque eu sou meio largado e desatencioso, mas eu ja revisei o cуdigo umas 2 vezes e nгo vejo erros na lуgica, esses comandos funcionavam normalmente atй que eu decidi colocar color embeeding neles utilizando o GetPlayerColor, depois q eu mudei isto esses comandos pararam de funcionar, ou melhor, eles nгo pararam de funcionar, eles fizeram o compilador parar de funcionar! ajuda plz
Код:
YCMD:ir(playerid, params[], ajuda) { if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб autorizado a usar este comando"); if(pTrampo[playerid] != true) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб trabalhando. "EMBED_CINZA"Use: /profadmin"); if(ajuda) return SendClientMessage(playerid, BRANCO, "Ajuda: leva vocк atй alguйm. "EMBED_CINZA"Uso: /ir [ID/Nome]"); new plid; if(sscanf(params, "u", plid)) return SendClientMessage(playerid, CINZA, "Uso: /ir [ID/Nome]"); foreach(new i : Player) if(IsPlayerInRangeOfPlayer(35.0, i, playerid) || IsPlayerInRangeOfPlayer(35.0, i, plid)) SendFormattedMessage(i, COLOR_SERVER, "%s {%06x}%s (%d) "EMBED_SERVER"foi atй {%06x}%s (%d)", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, GetPlayerColor(plid) >>> 8, PlayerName(plid), plid); new Float:Pos[4], Float:angle; GetPlayerPos(plid, Pos[0], Pos[1], Pos[2]); GetPlayerFacingAngle(plid, angle); SetPlayerPos(playerid, Pos[0]-1, Pos[1]-1, Pos[2]); SetPlayerFacingAngle(playerid, angle); SetPlayerInterior(playerid, GetPlayerInterior(plid)); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plid)); printf("%s %s (%d) foi atй %s (%d)", AdminName(PlayerInfo[playerid][pAdmin]), PlayerName(playerid), playerid, PlayerName(plid), plid); return 1; } YCMD:trazer(playerid, params[], ajuda) { if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб autorizado a usar este comando"); if(pTrampo[playerid] != true) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб trabalhando. "EMBED_CINZA"Use: /profadmin"); if(ajuda) return SendClientMessage(playerid, BRANCO, "Ajuda: trбs alguйm atй vocк. "EMBED_CINZA"Uso: /tr [ID/Nome]"); new plid; if(sscanf(params, "u", plid)) return SendClientMessage(playerid, CINZA, "Uso: /tr [ID/Nome]"); foreach(new i : Player) if(IsPlayerInRangeOfPlayer(35.0, i, playerid) || IsPlayerInRangeOfPlayer(35.0, i, plid)) SendFormattedMessage(i, COLOR_SERVER, "%s {%06x}%s (%d) "EMBED_SERVER"trouxe {%06x}%s (%d)", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, GetPlayerColor(plid) >>> 8, PlayerName(plid), plid); new Float:Pos[4], Float:angle; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); GetPlayerFacingAngle(playerid, angle); SetPlayerPos(plid, Pos[0]-1, Pos[1]-1, Pos[2]); SetPlayerFacingAngle(plid, angle); SetPlayerInterior(plid, GetPlayerInterior(playerid)); SetPlayerVirtualWorld(plid, GetPlayerVirtualWorld(playerid)); printf("%s %s (%d) trouxe %s (%d)", AdminName(PlayerInfo[playerid][pAdmin]), PlayerName(playerid), playerid, PlayerName(plid), plid); return 1; } YCMD:vida(playerid, params[], ajuda) { if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб autorizado a usar este comando"); if(pTrampo[playerid] != true) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб trabalhando. "EMBED_CINZA"Use: /profadmin"); if(ajuda) return SendClientMessage(playerid, BRANCO, "Ajuda: aumenta/diminui a vida de alguйm(min: 0, max: 100). "EMBED_CINZA"Uso: /vida [ID/Nome] [quantia]"); new plid, Float:vida; if(sscanf(params, "uf", plid, vida)) return SendClientMessage(playerid, CINZA, "Uso: /vida [ID/Nome] [quantia]"); if(vida < 0) SetPlayerHealth(plid, 0); else if(vida > 100) SetPlayerHealth(plid, 100); else SetPlayerHealth(plid, vida); foreach(new i : Player) if(IsPlayerInRangeOfPlayer(35.0, i, playerid)) SendFormattedMessage(i, COLOR_SERVER, "%s {%06x}%s (%d) "EMBED_SERVER"setou a vida de {%06x}%s (%d) "EMBED_SERVER"para %.1f", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, GetPlayerColor(plid) >>> 8, PlayerName(plid), plid, vida); printf("%s %s (%d) setou a vida de %s (%d) para %.1f", AdminName(PlayerInfo[playerid][pAdmin]), PlayerName(playerid), playerid, PlayerName(plid), plid, vida); return 1; } YCMD:colete(playerid, params[], ajuda) { if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб autorizado a usar este comando"); if(pTrampo[playerid] != true) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб trabalhando. "EMBED_CINZA"Use: /profadmin"); if(ajuda) return SendClientMessage(playerid, BRANCO, "Ajuda: aumenta/diminui o colete de alguйm(min: 0, max: 100). "EMBED_CINZA"Uso: /cl [ID/Nome] [quantia]"); new plid, Float:cl; if(sscanf(params, "uf", plid, cl)) return SendClientMessage(playerid, CINZA, "Uso: /cl [ID/Nome] [quantia]"); if(cl < 0) SetPlayerArmour(plid, 0); else if(cl > 100) SetPlayerArmour(plid, 100); else SetPlayerArmour(plid, cl); foreach(new i : Player) if(IsPlayerInRangeOfPlayer(35.0, i, playerid)) SendFormattedMessage(i, COLOR_SERVER, "%s {%06x}%s (%d) "EMBED_SERVER"setou o colete de {%06x}%s (%d) "EMBED_SERVER"para %.1f", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, GetPlayerColor(plid) >>> 8, PlayerName(plid), plid, cl); printf("%s %s (%d) setou o colete de %s (%d) para %.1f", AdminName(PlayerInfo[playerid][pAdmin]), PlayerName(playerid), playerid, PlayerName(plid), plid, cl); return 1; } YCMD:grana(playerid, params[], ajuda) { if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб autorizado a usar este comando"); if(pTrampo[playerid] != true) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб trabalhando. "EMBED_CINZA"Use: /profadmin"); if(ajuda) return SendClientMessage(playerid, BRANCO, "Ajuda: aumenta/diminui a grana de alguйm. "EMBED_CINZA"Uso: /gr [ID/Nome] [quantia]"); new plid, gr; if(sscanf(params, "ud", plid, gr)) return SendClientMessage(playerid, CINZA, "Uso: /gr [ID/Nome] [quantia]"); GivePlayerMoney(plid, gr); foreach(new i : Player) if(PlayerInfo[i][pAdmin] > 0) SendFormattedMessage(i, COLOR_SERVER, "%s {%06x}%s (%d) "EMBED_SERVER"deu "EMBED_VERDE"$%d "EMBED_SERVER"para {%06x}%s (%d)", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, gr, GetPlayerColor(plid) >>> 8, PlayerName(plid), plid); SendFormattedMessage(plid, COLOR_SERVER, "%s {%06x}%s (%d)"EMBED_SERVER" te deu "EMBED_VERDE"$%d", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, gr); printf("%s %s (%d) deu $%d para %s (%d)", AdminName(PlayerInfo[playerid][pAdmin]), PlayerName(playerid), playerid, gr, PlayerName(plid), plid); return 1; } YCMD:skin(playerid, params[], ajuda) { if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб autorizado a usar este comando"); if(pTrampo[playerid] != true) return SendClientMessage(playerid, VERMELHO, "Vocк nгo estб trabalhando. "EMBED_CINZA"Use: /profadmin"); if(ajuda) return SendClientMessage(playerid, BRANCO, "Ajuda: altera a skin de alguйm. "EMBED_CINZA"Uso: /skin [ID/Nome] [Skin]"); new plid, skin; if(sscanf(params, "ud", plid, skin)) return SendClientMessage(playerid, CINZA, "Uso: /skin [ID/Nome] [Skin]"); SetPlayerSkin(plid, skin); foreach(new i : Player) if(IsPlayerInRangeOfPlayer(35.0, i, playerid)) SendFormattedMessage(i, COLOR_SERVER, "%s {%06x}%s (%d)"EMBED_SERVER" setou a skin de {%06x}%s (%d)"EMBED_SERVER" para %d", AdminName(PlayerInfo[playerid][pAdmin]), GetPlayerColor(playerid) >>> 8, PlayerName(playerid), playerid, GetPlayerColor(plid) >>> 8, PlayerName(plid), plid, skin); printf("%s %s (%d) setou a skin de %s (%d) para %d", AdminName(PlayerInfo[playerid][pAdmin]), PlayerName(playerid), playerid, PlayerName(plid), plid, skin); return 1; }