if (strcmp(cmd, "/setarvip", true) == 0) { if (!IsPlayerAdmin(playerid)) return 0; new tmp[128]; new plid; tmp = strtok(cmdtext, idx); if (!strlen(tmp)) { SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /setarvip [id]."); return 1; } plid = strval(tmp); if (IsPlayerConnected(plid)) { new pname[MAX_PLAYER_NAME]; GetPlayerName(plid, pname, MAX_PLAYER_NAME); format(file2, sizeof(file2), PASTA_CONTAS, pname); dini_IntSet(file2, "VIP", 1); SpawnPlayer(playerid); SendClientMessage(playerid, 0x00FF00AA, "(INFO) VIP Setado com sucesso"); SendClientMessage(plid, 0x00FF00AA, "(INFO) Um admin setou VIP para vocк aproveite ;D"); return 1; } else { SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido"); return 1; } }
galera queria qui o id do player qui falar no chat fose igaul a este e quando o player for vip aparecer asim tbm alguem mi ajuda ?
|
public OnPlayerText(playerid, text[]) { format(string, sizeof(string), "%s.ini",pname); if(dini_Int(string,"VIP") == 1) { new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); format(stringv, sizeof(stringv), " [ID:%d][VIP]: %s",playerid,text); SendPlayerMessageToAll(playerid,stringv); return 0; } }
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string, sizeof(string), "%s.ini",pname);
if(dini_Int(string,"VIP") == 1)
{
format(stringv, sizeof(stringv), " [ID:%d][VIP]: %s",playerid,text);
SendPlayerMessageToAll(playerid,stringv);
}else {
format(stringv, sizeof(stringv), " [ID:%d]: %s",playerid,text);
SendPlayerMessageToAll(playerid,stringv);
}
return 0;
}