Command help - 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: Command help (
/showthread.php?tid=475649)
Command help -
EthanMason - 14.11.2013
pawn Код:
CMD:joinjob2(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,5, 43.6374,-224.5082,1.6927))
{
if(pInfo[playerid][Job2] == 0)
{
if(pInfo[playerid][VIPLevel] > 0)
{
if (!pInfo[playerid][Job1] == 1)
{
pInfo[playerid][Job2] = 1;
SendClientMessage(playerid, red, "[SERVER]: You have joined the Transporter Job");
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} Seems like your first job is the same job you're joining now");
}
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} You need to have atleast VIP level 1 to have a second job");
}
}
}
}
Eh i dunno why i get this Errors
Код:
C:\Users\dell\Desktop\Script\gamemodes\newroleplayserver.pwn(322) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\newroleplayserver.pwn(322) : error 017: undefined symbol "cmd_joinjob2"
C:\Users\dell\Desktop\Script\gamemodes\newroleplayserver.pwn(322) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\newroleplayserver.pwn(322) : fatal error 107: too many error messages on one line
[CMD:joinjob2...] is line number 322
Re: Command help -
SilentSoul - 14.11.2013
You forgot to add return 1;
pawn Код:
CMD:joinjob2(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,5, 43.6374,-224.5082,1.6927))
{
if(pInfo[playerid][Job2] == 0)
{
if(pInfo[playerid][VIPLevel] > 0)
{
if (!pInfo[playerid][Job1] == 1)
{
pInfo[playerid][Job2] = 1;
SendClientMessage(playerid, red, "[SERVER]: You have joined the Transporter Job");
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} Seems like your first job is the same job you're joining now");
}
}
else
{
SendClientMessage(playerid, red, "[SERVER]: {FFFFFF} You need to have atleast VIP level 1 to have a second job");
}
}
}
return 1; //this line missing
}