C:\Users\moises\Desktop\GM FANTASTIC WORLD\SFGANGSN3XT.pwn(3161) : warning 219: local variable "stringx" shadows a variable at a preceding level
C:\Users\moises\Desktop\GM FANTASTIC WORLD\SFGANGSN3XT.pwn(420) : warning 204: symbol is assigned a value that is never used: "MSGTimer"
C:\Users\moises\Desktop\GM FANTASTIC WORLD\SFGANGSN3XT.pwn(420 -- 4014) : warning 203: symbol is never used: "StringTable"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Warnings.
MSGTimer = SetTimer("RandomMSGs",150000,1);
//E NESTAS AKI , QUE ESTAO NO FIM DO GM
public RandomMSGs()
{
new random1 = random(sizeof(MSGs));
new random2 = random(sizeof(COLORS));
format(stringx, sizeof(stringx), "%s", MSGs[random1]);
SendClientMessageToAll(COLORS[random2],stringx);
return 1;
}
if (strcmp("/mudar", cmdtext, true, 10) == 0)
{
new Nome[MAX_PLAYER_NAME];
new stringx[256]; // warning esta nesta linha <<<
GetPlayerName(playerid,Nome,sizeof Nome);
format(stringx, sizeof stringx, "%s FOI MUDAR DE GANG {FF0000}( /MUDAR )",Nome);
SendClientMessageToAll(0xFFFF00FF,stringx);
ForceClassSelection(playerid); //--- isso que faz o player voltar na seleзгo de skin igual apertar "F4"
SetPlayerHealth(playerid, 0);
return 1;
}
MSGTimer = SetTimer("RandomMSGs",1500,1);
if (strcmp("/mudar", cmdtext, true, 10) == 0)
{
new Nome[MAX_PLAYER_NAME];
new stringx[100]; // warning esta nesta linha <<<
GetPlayerName(playerid,Nome,sizeof Nome);
format(stringx, sizeof stringx, "%s FOI MUDAR DE GANG {FF0000}( /MUDAR )",Nome);
SendClientMessageToAll(0xFFFF00FF,stringx);
ForceClassSelection(playerid); //--- isso que faz o player voltar na seleзгo de skin igual apertar "F4"
SetPlayerHealth(playerid, 0);
return 1;
}
pawn Код:
pawn Код:
|
if (strcmp("/mudar", cmdtext, true, 10) == 0) { new Nome[MAX_PLAYER_NAME]; new StringC[256]; // warning esta nesta linha <<< GetPlayerName(playerid,Nome,sizeof Nome); format(StringC, sizeof StringC, "%s FOI MUDAR DE GANG {FF0000}( /MUDAR )",Nome); SendClientMessageToAll(0xFFFF00FF,StringC); ForceClassSelection(playerid); //--- isso que faz o player voltar na seleзгo de skin igual apertar "F4" SetPlayerHealth(playerid, 0); return 1; }
new stringx[100];
Код:
if (strcmp("/mudar", cmdtext, true, 10) == 0) { new Nome[MAX_PLAYER_NAME]; new StringC[256]; // warning esta nesta linha <<< GetPlayerName(playerid,Nome,sizeof Nome); format(StringC, sizeof StringC, "%s FOI MUDAR DE GANG {FF0000}( /MUDAR )",Nome); SendClientMessageToAll(0xFFFF00FF,StringC); ForceClassSelection(playerid); //--- isso que faz o player voltar na seleзгo de skin igual apertar "F4" SetPlayerHealth(playerid, 0); return 1; } |
Problema 1:
Delete o que estб escrito na seguinte frase: pawn Код:
Problema 2: Coloque MSGTimer = blбblбblб no OnGameModeInit() [pawn]OnGameModeInit() { MSGTimer = bбblбblб } |
public OnGameModeInit()
{
SetGameModeText("TDM || SF v1.0 |");
SendRconCommand("mapname SanFierro");
ShowNameTags(1);
SetNameTagDrawDistance(80);
AllowInteriorWeapons(1);
UsePlayerPedAnims();
SetTimer("ZoneCheckpointChecker", 500, 1);
MSGTimer = SetTimer("RandomMSGs",1500,1);
SetTimer("PlayerObjectsUpdate",500,1);
LoadTextDraws();
Vlw , agora falta resolver as outras 2 warnings que eu postei , voce me ajudou a resolver o do /mudar , ainda tem o do MSG TIMER E Tals
|
//USe na public OngamModeint MSGTimer = SetTimer("RandomMSGs",150000,1); //E NESTAS AKI , QUE ESTAO NO FIM DO GM public RandomMSGs() { new random1 = random(sizeof(MSGs)); new random2 = random(sizeof(COLORS)); format(StringC, sizeof(StringC), "%s", MSGs[random1]); SendClientMessageToAll(COLORS[random2],StringC); return 1; }
new StringTable
// coloca isto em OnGameModeInt
MSGTimer = SetTimer("RandomMSGs",150000, true);
//E NESTAS AKI , QUE ESTAO NO FIM DO GM
public RandomMSGs()
{
new pt[120], random1, random2;
random1 = random(sizeof(MSGs));
random2 = random(sizeof(COLORS));
format(pt, sizeof(pt), "%s", MSGs[random1]);
SendClientMessageToAll(COLORS[random2], pt);
return 1;
}