CMD:fly(playerid, params[]) { StartFly(playerid); SetPlayerHealth(playerid, "99999999"); //LINE 393 SetPVarInt(playerid, "Fly", 1); return 1; } CMD:stopfly(playerid, params[]) { StopFly(playerid); SetPlayerHealth(playerid, "99"); // LINE 401 SetPVarInt(playerid, "Fly", 0); return 1; }
SetPVarInt(playerid, "Fly", 0); InitFly(playerid);
C:\Users\Marius\Desktop\rpg v0.0.1\gamemodes\rpg.pwn(393) : error 035: argument type mismatch (argument 2) C:\Users\Marius\Desktop\rpg v0.0.1\gamemodes\rpg.pwn(401) : error 035: argument type mismatch (argument 2)
Hello, I have a problem with "/fly" and "/stopfly":
Код:
CMD:fly(playerid, params[]) { StartFly(playerid); SetPlayerHealth(playerid, "99999999"); //LINE 393 SetPVarInt(playerid, "Fly", 1); return 1; } CMD:stopfly(playerid, params[]) { StopFly(playerid); SetPlayerHealth(playerid, "99"); // LINE 401 SetPVarInt(playerid, "Fly", 0); return 1; } Код:
SetPVarInt(playerid, "Fly", 0); InitFly(playerid); Код:
C:\Users\Marius\Desktop\rpg v0.0.1\gamemodes\rpg.pwn(393) : error 035: argument type mismatch (argument 2) C:\Users\Marius\Desktop\rpg v0.0.1\gamemodes\rpg.pwn(401) : error 035: argument type mismatch (argument 2) |
SetPlayerHealth(playerid, "99999999");
SetPlayerHealth(playerid, 99999999);
SetPlayerHealth(playerid, "99");
SetPlayerHealth(playerid,99);
Change this
PHP код:
PHP код:
PHP код:
PHP код:
|
if(IsPlayerAdmin(playerid)) return SCM(playerid, -1, "* Nu ai admin!"); //if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, "* Nu ai admin!"); if(MarkPos[playerid][0] == 0) return SCM(playerid, -1, "* Nu ai salvat o pozitie! (/mark)"); if(GetPlayerState(playerid == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]); else SetVehiclePos(playerid, MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]); SCM(playerid, -1, "Te-ai teleportat cu success!"); return 1; }
error 001: expected token: ")", but found "-identifier-"
Thank you!
I need some help with that: (Sorry I'm beginner.) Код:
if(IsPlayerAdmin(playerid)) return SCM(playerid, -1, "* Nu ai admin!"); //if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, "* Nu ai admin!"); if(MarkPos[playerid][0] == 0) return SCM(playerid, -1, "* Nu ai salvat o pozitie! (/mark)"); if(GetPlayerState(playerid == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]); else SetVehiclePos(playerid, MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]); SCM(playerid, -1, "Te-ai teleportat cu success!"); return 1; } Error: Код:
error 001: expected token: ")", but found "-identifier-" |
if(IsPlayerAdmin(playerid)) return SCM(playerid, -1, "* Nu ai admin!");
//if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, "* Nu ai admin!");
if(MarkPos[playerid][0] == 0) return SCM(playerid, -1, "* Nu ai salvat o pozitie! (/mark)");
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]);
else SetVehiclePos(playerid, MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]);
SCM(playerid, -1, "Te-ai teleportat cu success!");
return 1;
}
if(GetPlayerState(playerid == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]);
|
new pState = GetPlayerState(playerid);
if(pState == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), MarkPos[playerid][0], MarkPos[playerid][1], MarkPos[playerid][2]);
}