Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <dini> //Include
- new Vip[MAX_PLAYERS]; // Variavel
- public OnGameModeInit()
- {
- if(!fexist("vip.ini")) dini_Create("vip.ini");
- return 0;
- }
- public OnPlayerConnect(playerid)
- {
- if(dini_Isset("vip.ini",PlayerName(playerid))) (Vip[playerid] = dini_Int("vip.ini",PlayerName(playerid)));
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- dini_IntSet("vip.ini",PlayerName(playerid),Vip[playerid]);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/eu", cmdtext, true, 10) == 0)
- {
- if(Vip[playerid] > 1)
- {
- GivePlayerMoney(playerid,50000);
- }else{
- SendClientMessage(playerid,0x0000BBAA,"Lamento Você não e VIP :S");
- }
- return 1;
- }
- return 0;
- }
- stock PlayerName(playerid) {
- new PlayerName[MAX_PLAYERS];
- GetPlayerName(playerid, PlayerName, MAX_PLAYERS);
- return PlayerName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement