09.08.2010, 01:07
(
Последний раз редактировалось Ritchie999; 09.08.2010 в 01:09.
Причина: Posted wrong second command
)
Anyone know how i can convert this
To work in Carlito's Roleplay script
I'm doing a heavy edit of CRP for a clan that i'm in.
It's the script they wanted to use.
Here is the /gethere command from the Carlito's script
pawn Код:
if(strcmp(cmd,"/getallhere",true)==0)
{
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if(PlayerInfo[playerid][pAdmin] < 4) return DenyMessage(playerid, 4);
GetPlayerName(playerid, playrname, sizeof(playrname));
format(string, sizeof(string), "[INFO:] %s has just teleported everyone to his location.", playrname);
SendClientMessageToAll(COLOR_YELLOW, string);
new Float:x,Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
SetPlayerPos(plo,plocx,plocy+2, plocz);
}
return 1;
}
I'm doing a heavy edit of CRP for a clan that i'm in.
It's the script they wanted to use.
Here is the /gethere command from the Carlito's script
pawn Код:
if(strcmp(cmd, "/gethere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /gethere [playerid]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
new interior = GetPlayerInterior(playerid);
new world = GetPlayerVirtualWorld(playerid);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
format(string, sizeof(string), "[INFO:] You teleported %s to you.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Your not an administrator.");
}
}
}
else
{
format(string, sizeof(string), " %d is not an active player.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}}