Need little 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: Need little help (
/showthread.php?tid=436973)
Need little help -
alpai - 13.05.2013
(4254): error 010: invalid function or declaration
Код:
CMD:viplaser(playerid, params[])
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pVIP] >= 3)
{
if(VIPLaser[playerid] == 0)
{
new string[128];
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
format(string, 256, "VIP Laser: Ти добави лазера.");
SendClientMessage(playerid, COLOR_LIGHTRED, string);
VIPLaser[playerid] = 1;
}
else
{
new string[128];
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
format(string, 256, "VIP Laser: Ти премахна лазера.");
SendClientMessage(playerid, COLOR_LIGHTRED, string);
VIPLaser[playerid] = 0;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"Ти не си VIP!");
}
return 1;
}
Line 4254 is return 1;
Re: Need little help -
Calabresi - 13.05.2013
You've forgotten to open bracket.
pawn Код:
CMD:viplaser(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pVIP] >= 3)
{
if(VIPLaser[playerid] == 0)
{
new string[128];
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
format(string, 256, "VIP Laser: Ти добави лазера.");
SendClientMessage(playerid, COLOR_LIGHTRED, string);
VIPLaser[playerid] = 1;
}
else
{
new string[128];
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
format(string, 256, "VIP Laser: Ти премахна лазера.");
SendClientMessage(playerid, COLOR_LIGHTRED, string);
VIPLaser[playerid] = 0;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"Ти не си VIP!");
}
return 1;
}
Re: Need little help -
alpai - 13.05.2013
Hehe Cok Saol / Thanks