goto cmds -
Jaua10 - 10.06.2018
Hey guys im stucked with this cmd when i try to use it say unkown command where is the error?
PHP код:
CMD:gotols(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
else
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1258.7352,-2036.7100,59.4561);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Los Santos!");
}
return 1;
}
CMD:gotosf(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
else
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2018.0339,145.6004,27.9839);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to San Fierro!");
}
return 1;
}
CMD:gotolv(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
else
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2034.0673,1007.7039,10.8203);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Las Venturas!");
}
return 1;
}
thanks in advice
Re: goto cmds -
DarkSkull - 11.06.2018
You don't need else there.
This should work just fine.
PHP код:
CMD:gotols(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1258.7352,-2036.7100,59.4561);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Los Santos!");
return 1;
}
Re: goto cmds -
Robin96 - 11.06.2018
Do you get that message every time or only if you use the command when you're not an admin? If it's the latter, then try returning 1 rather than SendClientMessage. Then you code would look like this:
PHP код:
CMD:gotosf(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2)
{ SendClientMessage(playerid, COLOR_RED, NOTADMIN);
return 1;
}
else
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2018.0339,145.6004,27.9839);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to San Fierro!");
}
return 1;
}
Re: goto cmds -
Jaua10 - 11.06.2018
still not woking, says the same msg unknown cmd
Re: goto cmds -
SyS - 11.06.2018
Seems like a crash.Compile the code in
-d3 and use
crashdetect plugin.It might give some more information about crash.
Re: goto cmds -
Jaua10 - 11.06.2018
PHP код:
[PHP]CMD:gotols(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1258.7352,-2036.7100,59.4561);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Los Santos!");
}
return 1;
}
CMD:gotosf(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2018.0339,145.6004,27.9839);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to San Fierro!");
}
return 1;
}
CMD:gotolv(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, NOTADMIN);
{
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2034.0673,1007.7039,10.8203);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Las Venturas!");
}
return 1;
}
[/PHP]
Код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team
[22:40:06] filterscripts = "" (string)
[22:40:06] weburl = "www.sa-mp.com" (string)
[22:40:06]
[22:40:06] Server Plugins
[22:40:06] --------------
[22:40:06] Loading plugin: crashdetect
[22:40:06] CrashDetect v4.15.1 is OK.
[22:40:06] Loaded.
[22:40:06] Loading plugin: sscanf
[22:40:06]
[22:40:06] ===============================
[22:40:06] sscanf plugin loaded.
[22:40:06] Version: 2.8.2
[22:40:06] © 2012 Alex "******" Cole
[22:40:06] ===============================
[22:40:06] Loaded.
[22:40:06] Loading plugin: nativechecker
[22:40:06] Loaded.
[22:40:06] Loaded 3 plugins.
[22:40:06]
[22:40:06] Filterscripts
[22:40:06] ---------------
[22:40:06] Loaded 0 filterscripts.
[22:40:06]
[22:40:06]
[22:40:06]
[22:40:06] =======================================
[22:40:06] | |
[22:40:06] | YSI version 3.09.0684 |
[22:40:06] | By Alex "******" Cole |
[22:40:06] | |
[22:40:06] =======================================
[22:40:06]
[22:40:06]
[22:40:06]
[22:40:06]
[22:40:06] -------------------------------------------
[22:40:06] Connected to Grand Theft Auto Roleplay
[22:40:06] Welcome to Grand Theft Auto Roleplay
[22:40:06] -------------------------------------------
[22:40:06]
[22:40:06] Number of vehicle models: 26
Re: goto cmds -
Sew_Sumi - 11.06.2018
Why'd you re-post this again?
Код:
CMD:gotols(playerid)
{
if(!IsPlayerAdmin(playerid)) {return 0;}
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1258.7352,-2036.7100,59.4561);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Los Santos!");
return 1;
}
CMD:gotosf(playerid)
{
if(!IsPlayerAdmin(playerid)) {return 0;}
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2018.0339,145.6004,27.9839);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to San Fierro!");
return 1;
}
CMD:gotolv(playerid)
{
if(!IsPlayerAdmin(playerid)) {return 0;}
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2034.0673,1007.7039,10.8203);
SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to Las Venturas!");
return 1;
}
Notice no else as was mentioned before.
Re: goto cmds -
Jaua10 - 19.06.2018
because still not working, anyone can help me?
Re: goto cmds -
DerickClark - 19.06.2018
Quote:
Originally Posted by Jaua10
because still not working, anyone can help me?
|
Maybe cause you are not RCON admin...
Re: goto cmds -
kovac - 19.06.2018
You probably aren't logged into RCON.