Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Server Locker v1.0
- by Crush
- [iPs TeaM] | www.ips-team.blogspot.com |
- */
- /*
- @Creator: DraKiNs
- @Project: ReturnParam
- @Date: 27/06/2011
- @Site: www.ips-team.blogspot.com
- */
- #define NULL '\0'
- #define IsServerLocked sSenha[0]
- stock
- sSenha[128] = NULL;
- //=========== [ Commands ] =======================================
- if(!strcmp(cmdtext, "/trancar", true, 8)) // 8 = lenght of /trancar
- {
- if(!IsPlayerAdmin(playerid)) return false;
- static
- sStr[128]
- ;
- GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
- format(sStr, 128, "O admin %s[%i]: acabou de trancar o servidor",sStr, playerid);
- SendClientMessageToAll(0xFFFFFFFF, sStr);
- return sSenha = ReturnParam(cmdtext, 1), true;
- }
- if(!strcmp(cmdtext, "/destrancar", true)) // 11 = lenght of /trancar
- {
- static
- sStr[128]
- ;
- GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
- format(sStr, 128, "%s[%i]: acabou de destrancar o servidor",sStr, playerid);
- SendClientMessageToAll(0xFFFFFFFF, sStr);
- return sSenha[0] = NULL, true;
- }
- //=========== [ Function ] =======================================
- ReturnParam(cmdtext[], param)
- {
- #if !defined MAX_STRING
- #define MAX_STRING 128
- #endif
- new
- i,
- spaces,
- string[MAX_STRING],
- ;
- for( ; spaces != param; ++i)
- {
- if(!(cmdtext[i] == 0x20)) continue;
- spaces++;
- }
- return strcat(string,cmdtext[i], MAX_STRING), cmdtext[i] = EOS, string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement