SA-MP Forums Archive
Teleport Team Cmd (rep++) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Teleport Team Cmd (rep++) (/showthread.php?tid=330999)



Teleport Team Cmd (rep++) - iOmar - 03.04.2012

Hey Guys!!
==> I want to add in my script about admin command like
"/tp USA to my place where i am standing!" 0R "/tp RUSSIA to my place where i am standing!" to organize events...
I want this cmd only for lvl3+ admins....
Please help me!!!


Re: Teleport Team Cmd (rep++) - sjvt - 03.04.2012

We can't make it for you because we don't know how your admin system works and your team system, and what are you use strcmp, dcmd, ycmd, zcmd etc?


Re: Teleport Team Cmd (rep++) - StinkMoney - 03.04.2012

Quote:
Originally Posted by sjvt
Посмотреть сообщение
We can't make it for you because we don't know how your admin system works and your team system, and what are you use strcmp, dcmd, ycmd, zcmd etc?
agreed.


Re: Teleport Team Cmd (rep++) - iOmar - 03.04.2012

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/cmds", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFF0000FF,"Server CMDS: /Help, /Rules, /Kill"); // Copy this to add more !
return 1;
}

if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0.00);
return 1;
}

Here are two commands from my Gm.. I am using "strcmp"..
I do not make any of admin commands. I am starting from this!


Re: Teleport Team Cmd (rep++) - BleverCastard - 03.04.2012

This is Scripting Discussion, you show us your code where you ATTEMPTED to script it, and we can fix it for you.


Re: Teleport Team Cmd (rep++) - blank. - 03.04.2012

So how exactly do you define teams if you have nothing to show for it?


Re: Teleport Team Cmd (rep++) - iOmar - 03.04.2012

If i said i am using LAdmin??

Quote:

if(strcmp(cmd, "/lspec", true) == 0) {
if(PlayerInfo[playerid][Level] >= 2) {
new tmp[256], specplayerid;
tmp = strtok(cmdtext, idx);

if(!strlen(tmp)) return SendClientMessage(playerid, red, "USAGE: /specplayer [playerid]");

specplayerid = strval(tmp);

if(!IsPlayerConnected(specplayerid) || (PlayerInfo[specplayerid][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) ) {
SendClientMessage(playerid,red,"ERROR: Player is not connected");
return 1; }

if(specplayerid == playerid) return SendClientMessage(playerid, red, "ERROR: You cannot spectate yourself");

if(GetPlayerState(specplayerid) == PLAYER_STATE_SPECTATING && gSpectateID[specplayerid] != INVALID_PLAYER_ID) {
SendClientMessage(playerid, red, "Spectate: Player spectating someone else");
return 1;
}




Re: Teleport Team Cmd (rep++) - sjvt - 03.04.2012

WRONG


Re: Teleport Team Cmd (rep++) - iOmar - 03.04.2012

Quote:

#define TEAM_PAKISTAN 1
#define TEAM_GERMNAY 2
#define TEAM_USA 3
#define TEAM_RUSSIA 4
#define TEAM_INDIA 5

Quote:

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 408.1266,2532.2192,17.770);
SetPlayerFacingAngle(playerid,87.1413);
SetPlayerCameraPos(playerid, 401.6212,2532.2688,16.5452);
SetPlayerCameraLookAt(playerid, 401.6212,2532.2688,16.5452);

if(GetPlayerSkin(playerid) == 179)
{
GameTextForPlayer(playerid, "~g~PAKISTAN", 1000, 4);
SetPlayerColor(playerid, GREEN);
}
if(GetPlayerSkin(playerid) == 30)
{
GameTextForPlayer(playerid, "~o~GERMANY", 1000, 4);
SetPlayerColor(playerid, ORANGE);
}
if(GetPlayerSkin(playerid) == 287)
{
GameTextForPlayer(playerid, "~b~USA", 1000, 4);
SetPlayerColor(playerid, BLUE);
}
if(GetPlayerSkin(playerid) == 285)
{
GameTextForPlayer(playerid, "~r~RUSSIA", 1000, 4);
SetPlayerColor(playerid, RED);
}
else if(GetPlayerSkin(playerid) == 73)
{
GameTextForPlayer(playerid, "~y~INDIA", 1000, 4);
SetPlayerColor(playerid, YELLOW);
}
return 1;

I am using this team system!!


Re: Teleport Team Cmd (rep++) - Reklez - 03.04.2012

use [ pawn ] [ / pawn ] instead of [ quote ] [ / quote ]