[HELP]Vjetpack command -
Kirchhoff - 21.05.2013
Command :
pawn Код:
//=============================================================================================================================================================
// = Comanda: vip Gold /vjetpack
//=============================================================================================================================================================
CMD:vjetpack(playerid, params[])
{
new sendername[MAX_PLAYER_NAME],string[256];
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pVip] >= 1)
{
if(takezone == 1)
{
SendClientMessage(playerid, 0xFF7F50AA, ""#GAlbastru"[Suceava-RPG]:{ffffff}Iti este prea lene sa iti pui jetpack !");
return 1;
}
else
{
SendClientMessage(playerid, 0xFF7F50AA, ""#GAlbastru"[Suceava-RPG]:{ffffff}Ai jetpack acum !");
GivePlayerWeapon(playerid, 370, 9999);
SetPlayerSpecialAction(playerid,2);
return 1;
}
}
else
{
SendClientMessage(playerid,0xFF0000AA,"Nu poti folosi aceasta comanda!");
return 1;
}
}
return 1;
}
Errors :
pawn Код:
D:\samp03\gamemodes\GameFront.pwn(49872) : error 029: invalid expression, assumed zero
D:\samp03\gamemodes\GameFront.pwn(49872) : error 017: undefined symbol "cmd_vjetpack"
D:\samp03\gamemodes\GameFront.pwn(49872) : error 029: invalid expression, assumed zero
D:\samp03\gamemodes\GameFront.pwn(49872) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
line is : CMD:vjetpack(playerid, params[])
Re: [HELP]Vjetpack command -
DobbysGamertag - 21.05.2013
have you got ZCMD included?
Re: [HELP]Vjetpack command -
Kirchhoff - 21.05.2013
ofcourse but I don't think this command is the problem , I screwed my gamemode a little trying to convert from strcmp to zcmd . I will posta later if I fix it sorry
Re: [HELP]Vjetpack command -
BenTaylorUK - 21.05.2013
Have you closed off the previous command before this? You can get this error if the command before is not closed properly.
Re: [HELP]Vjetpack command -
Kirchhoff - 21.05.2013
I left it where it was before and it's working , but now I have other problem I tried to convert a strcmp to zcmd
here is the zcmd (not working)
pawn Код:
CMD:vgoto[playerid, params[])
{
new sendername[MAX_PLAYER_NAME],string[256];
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(strlen(params))
{
SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /vgoto [playerid/PartOfName]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(params);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if (PlayerInfo[playerid][pVip] >= 2)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0)
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
SetPlayerVirtualWorld(playerid, 0);
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffd700}Ai fost Teleportat cu succes.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, ""#GAlbastru"[Suceava-RPG]: {800080}Vip {059e42}[%s]{ffffff} a folosit comanda {f70f0f}[/vgoto]", sendername);
SendAdminMessage(COLOR_LIGHTRED,string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");
}
}
}
else
{
format(string, sizeof(string), ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar acest jucator nu este Online.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
and here is the strcmp working
pawn Код:
if(strcmp(cmd, "/vgoto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /vgoto [playerid/PartOfName]");
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][pVip] >= 2)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0)
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
SetPlayerVirtualWorld(playerid, 0);
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffd700}Ai fost Teleportat cu succes.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, ""#GAlbastru"[Suceava-RPG]: {ffffff}Vip {059e42}[%s]{ffffff} a folosit comanda {f70f0f}[/vgoto]", sendername);
SendAdminMessage(COLOR_LIGHTRED,string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar nu ai acces la aceasta comanda.");
}
}
}
else
{
format(string, sizeof(string), ""#GAlbastru"[Suceava-RPG]: {ffffff}Ne pare rau, dar acest jucator nu este Online.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
And it's not working to compile it doesn't give any errors just not working . Why ?
Re: [HELP]Vjetpack command -
edzis84 - 21.05.2013
This might be a problem.
Код:
CMD:vgoto[playerid, params[])
{
To
Код:
CMD:vgoto(playerid, params[])
{