07.01.2012, 22:30
forward temposeg(playerid);
E no comando eu coloco:
temposeg[playerid]=1;
SetTimerEx("tempo", 3000000, 0, "i", playerid);
funciona? Daн eu colo que se temposeg[playerid]=1 pra dizer que ainda nгo pode...
Deu esses erros:
D:\GTA\SA\gn\gamemodes\gamemode.pwn(4092) : warning 203: symbol is never used: "playerid"
D:\GTA\SA\gn\gamemodes\gamemode.pwn(1218 : warning 202: number of arguments does not match definition
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : error 028: invalid subscript (not an array or too many subscripts): "temposeg"
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : warning 215: expression has no effect
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : error 001: expected token: ";", but found "]"
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : error 029: invalid expression, assumed zero
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
E no comando eu coloco:
temposeg[playerid]=1;
SetTimerEx("tempo", 3000000, 0, "i", playerid);
funciona? Daн eu colo que se temposeg[playerid]=1 pra dizer que ainda nгo pode...
pawn Код:
if(strcmp(x_job,"seguranca",true)==0)
{
if(SegOffer[playerid] < 999)
{
if(IsPlayerConnected(SegOffer[playerid]))
{
if(temposeg[playerid] == 1){
return SendClientMessage(playerid, COLOR_RED,"[ERRO] Vocк deve esperar 10 minutos para aceitar proteзгo, pois a sua ъltima ainda vale.");}
if(SegPrice[playerid] < 1) {
return SendClientMessage(playerid, COLOR_RED,"[ERRO] Nenhum Seguranзa lhe ofereceu serviзo.");
}
else if(GetPlayerGP(playerid) < SegPrice[playerid])
{
SendClientMessage(playerid, COLOR_RED,"[ERRO] Vocк nгo tem dinheiro suficiente");
SendClientMessage(SegOffer[playerid],COLOR_GREY, "O jogador nгo tem dinheiro suficiente");
return 1;
}
if(Player[playerid][pMember] != TEAM_SEGURANCA && Player[playerid][pLeader] != TEAM_SEGURANCA) {
new giveid = SegOffer[playerid];
format(thestring, sizeof(thestring), "O Seguranзa %s estб te protegendo!",Player[giveid][pName]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, thestring);
format(thestring, sizeof(thestring), "Vocк aceitou proteger: %s e recebeu o dinheiro combinado.", Player[playerid][pName]);
SendClientMessage(SegOffer[playerid], COLOR_LIGHTBLUE, thestring);
GivePlayerGP(playerid, - SegPrice[playerid]);
GivePlayerGP(SegOffer[playerid], SegPrice[playerid]);
SegOffer[playerid] = 999;
SegPrice[playerid] = 0;
temposeg[playerid] = 1;
SetTimerEx("temposeg", 3000000, false, "i", playerid);
return 1;
}
else if(Player[playerid][pMember] == TEAM_SEGURANCA || Player[playerid][pLeader] == TEAM_SEGURANCA) {
return SendClientMessage(playerid, COLOR_RED,"[ERRO] Vocк й seguranзa, nгo pode ser protegido.");
}
}
}
else
return SendClientMessage(playerid, COLOR_RED,"[ERRO] Nenhum Seguranзa lhe ofereceu serviзo.");
return 1;
}
D:\GTA\SA\gn\gamemodes\gamemode.pwn(4092) : warning 203: symbol is never used: "playerid"
D:\GTA\SA\gn\gamemodes\gamemode.pwn(1218 : warning 202: number of arguments does not match definition
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : error 028: invalid subscript (not an array or too many subscripts): "temposeg"
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : warning 215: expression has no effect
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : error 001: expected token: ";", but found "]"
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : error 029: invalid expression, assumed zero
D:\GTA\SA\gn\gamemodes\gamemode.pwn(46411) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.