//no topo
new cumprimento[MAX_PLAYERS];
new tacumprimentando[MAX_PLAYERS];
//nos comandos.
CMD:ola(playerid,params[])
{
new id,str[50];
if(sscanf(params, "i", id)) return SendClientMessage(playerid,-1,"uso: /ola [id]");
if(cumprimento[id] == 1) return SendClientMessage(playerid,-1"este player ja esta sendo cumprimentado");
if(!IsPlayerInAnyVehicle(id) || !IsPlayerInAnyVehicle (playerid)) return SendClientMessage(playerid,-1"Alguem ta fora do carro");
format(str,50,"%s, estб lhe cumprimentando, use /aceitarcumprimento", pName(playerid));
SendClientMessage(id,-1,str);
SetTimerEx("aceitaola",500,true,"ii",playerid,id);
return 1;
}
CMD:aceitarcumprimento(playerid,params[])
{
if(cumprimento[playerid] == 1)
{
SendClientMessage("vc aceitou o cumprimento";
tacumprimentando[playerid] = 1;
return 1;
}
else
{
SendClientMessage(playerid,-1,"tem ninguem te cumprimentando vacilгo");
}
return 1;
}
// no final do gm.
forward tcp(playerid,id);
public tcp(playerid, id)
{
if( tacumprimentando[id] == 1)
{
SetPlayerHealth(id,-10);
SetPlayerHealth(playerid,-10);
format(str,50,"%s estб dizendo Olб", pName(playerid);
SendClientMessage(id,-1,str);
format(str,50,"%s estб dizendo Olб", pName(id);
SendClientMessage(playerid,-1,str);
SetTimerEx("cancel",2000,false,"ii",id,playerid);
}
}
forward cancel(playerid, id);
public cancel(playerid,id)
{
cumprimento[playerid] == 0;
tacumprimentando[id] = 0;
}
isso ta em dini? й que eu uso o dini no meu gm,SE nao tiver,nao se importaria de fazer a transformaзao pra min? Dou ++REP
|
CMD:aceitarcumprimento(playerid,params[])
if(strcmp(cmd, "/comando", true) == 0)
C:\Users\Jesus\Desktop\Comunidade OG\OG\gamemodes\OG-RP.pwn(5324) : error 017: undefined symbol "sscanf"
C:\Users\Jesus\Desktop\Comunidade OG\OG\gamemodes\OG-RP.pwn(5325) : error 001: expected token: ",", but found "-string-"
C:\Users\Jesus\Desktop\Comunidade OG\OG\gamemodes\OG-RP.pwn(5325) : warning 215: expression has no effect
C:\Users\Jesus\Desktop\Comunidade OG\OG\gamemodes\OG-RP.pwn(5325) : error 001: expected token: ";", but found ")"
C:\Users\Jesus\Desktop\Comunidade OG\OG\gamemodes\OG-RP.pwn(5325) : error 029: invalid expression, assumed zero
C:\Users\Jesus\Desktop\Comunidade OG\OG\gamemodes\OG-RP.pwn(5325) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.