Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <Pawn.CMD>
- main(){}
- new gTeam[MAX_PLAYERS], gAdmin[MAX_PLAYERS];
- public OnPlayerConnect(playerid) {
- gAdmin[playerid] = 0;
- gTeam[playerid] = 0;
- return 1;
- }
- CMD:getteam(playerid) {
- if(gAdmin[playerid] > 0) {
- new Float:Pos[4];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- for(new targetid = 0, maxs = GetPlayerPoolSize(); targetid <= maxs; targetid++) {
- if(IsPlayerConnected(targetid) && gTeam[targetid] == 1) {
- SetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
- SetPlayerInterior(targetid, GetPlayerInterior(playerid));
- SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid));
- SendClientMessage(targetid, -1, " You were summoned to this admin as they used /getteam.");
- }
- }
- }
- else
- SendClientMessage(playerid, -1, "{D7D7D7}You're not authorized to use this command!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement