CMD:pm(playerid, params[])
{
new rMsg[148],PlayerID,String[150];
if(sscanf(params, "us[125]", PlayerID, rMsg)) return SendClientMessage(playerid, Azul, "{3cff00}Ч PM Ч {FFFFFF}/pm [playerid] [mensagem]");
if(!IsPlayerConnected(PlayerID)) return SendClientMessage(playerid, Cinza, "{3cff00}Ч ERRO Ч {FFFFFF} Jogador nгo estб conectado.");
format(String, sizeof(String), "Ч PM Ч %s(%d){f4e60c} diz: {f4e60c}%s", rNome(playerid), playerid, rMsg);
SendClientMessage(PlayerID, Amarelo, String);
format(String, sizeof(String), "Ч PM Ч %s(%d){f4e60c} diz: {f4e60c}%s", rNome(playerid), PlayerID, rMsg);
SendClientMessage(playerid, Amarelo, String);
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
return 1;
}
CMD:afk(playerid, params[])
{
new Motivo[50];
if(sscanf(params, "s[50]", Motivo)) return SendClientMessage(playerid, Cinza, "{3cff00}Ч INFO Ч {FFFFFF} /Afk [Motivo]");
new String[130];
format(String, sizeof(String), "{3cff00}Ч AFK Ч {f00c0c}%s {FFFFFF}entrou em modo ausente({f00c0c}/On{FFFFFF}). Motivo:[%s]", rNome(playerid), Motivo);
SendClientMessageToAll(AzulC, String);
AFK[playerid] = true;
TogglePlayerControllable(playerid, false);
AfkPlay[playerid] = Create3DTextLabel("Jogador Aus", Verde, 20.0, 20.0, 20.0, 20.0, 0);
Attach3DTextLabelToPlayer(AfkPlay[playerid], playerid, 0.0, 0.0, 0.4);
return 1;
}
Galera Bom Dia bom eu tava vendo meu GM e fui digitar um comando e ele retorno pra mim pois isso acontece com comandos sscanf mais e somente 2 nao e todos comandos que estao em sscanf ae no GM quando eu coloco include sscanf2 ele retorna todos os comandos e quando eu coloco somente a sscanf ele funciona alguns e retorna outros aki alguns comandos que estao retornando.
|
CMD:ir(playerid, params[])
{
new PlayerID, Veiculo;
new rString[150];
if(sscanf(params, "u",PlayerID)) return SendClientMessage(playerid, Azul, "{3cff00}Ч INFO Ч {a9a9a9}/Goto [playerid]");
if(!IsPlayerConnected(PlayerID)) return SendClientMessage(playerid, Cinza, "{3cff00}Ч ERRO Ч {A9A9A9}Jogador nгo estб conectado.");
GetPlayerPos(PlayerID, X, Y, Z);
if(IsPlayerInAnyVehicle(playerid))
{
Veiculo = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(Veiculo, GetPlayerInterior(PlayerID));
SetVehiclePos(Veiculo, X, Y, Z+2);
PutPlayerInVehicle(playerid, Veiculo, 0);
format(rString, sizeof(rString), "{3cff00}Ч INFO Ч {FFFFFF}Vocк foi atй o jogador {FF0000}%s{FFFFFF}.", rNome(PlayerID));
SendClientMessage(playerid, Cinza, rString);
format(rString, sizeof(rString), "{3cff00}Ч INFO Ч {FFFFFF}O jogador {FF0000}%s{FFFFFF} se teleportou atй vocк.", rNome(playerid));
SendClientMessage(PlayerID, Cinza, rString);
}else{
SetPlayerPos(playerid, X, Y, Z+2);
SetPlayerInterior(playerid, GetPlayerInterior(PlayerID));
format(rString, sizeof(rString), "{3cff00}Ч INFO Ч {FFFFFF}Vocк foi atй o jogador {FF0000}%s{FFFFFF}.", rNome(PlayerID));
SendClientMessage(playerid, Cinza, rString);
format(rString, sizeof(rString), "{3cff00}Ч INFO Ч {FFFFFF}O jogador {FF0000}%s{FFFFFF} se teleportou atй vocк.", rNome(playerid));
SendClientMessage(PlayerID, Cinza, rString);
}
return 1;
}
if(sscanf(params, "s[50]", Motivo))
Pode ter valores "[50]" dentro dos parametros do sscanf ?
pawn Код:
|
new string[128];
sscanf(params, "s[128]", string);