21.02.2014, 21:27
Olб, gente e tenho um sistema de vip mas ele sу tem um VIP if(vip[playerid] == 1) esse й o comando do player vip 1 , й o vip diamante , mas eu queria adicionar outra classe , Tipo VIP PREMIUM , alguem poderia me informar como eu fasso isso, informar um tutorial , Obrigado
!
Comando de setar VIP !
Codigo de tirar o VIP !
Thanks
![Cheesy](images/smilies/biggrin.png)
Comando de setar VIP !
Код:
if(strcmp(cmd, "/setarvip", true) == 0) { if(!IsPlayerAdmin(playerid)) return 0; new tmp[256]; 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(plid); 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; } }
Код:
if(strcmp(cmd, "/tirarvip", true) == 0) { if(!IsPlayerAdmin(playerid)) return 0; new tmp[256]; new plid; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /tirarvip [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",0); SpawnPlayer(plid); SendClientMessage(playerid, 0x00FF00AA, "(INFO) VIP Tirado com sucesso"); SendClientMessage(plid, 0x00FF00AA, "(INFO) Um admin tirou VIP de vocк ! "); return 1; }else{ SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido"); return 1; } }
![Cheesy](images/smilies/biggrin.png)