Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- new
- bool:Olding[MAX_PLAYERS char]
- ;
- public OnPlayerConnect(playerid)
- {
- Olding{playerid} = false;
- static Nome[28];
- GetPlayerName(playerid, Nome, 24); strcat(Nome,".ips");
- if(fexist(Nome))
- {
- Olding{playerid} = true;
- }
- return true;
- }
- public OnPlayerSpawn(playerid)
- {
- if(Olding[playerid] == true)
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, -1,"Você foi morto por que já foste banido.");
- return 0;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext,"/BAM", true))
- {
- permBan(playerid);
- return 1;
- }
- return 0;
- }
- static stock permBan(playerid, motivo[] = "Sem Motivo aparente")
- {
- if(IsPlayerConnected(playerid) && !IsPlayerAdmin(playerid))
- {
- static Nome[28], File: Suy;
- GetPlayerName(playerid, Nome, 24); strcat(Nome,".ips");
- Suy = fopen(Nome, io_write);
- fwrite(Suy, motivo);
- fclose(Suy);
- BanEx(playerid, motivo);
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment