Paint -
MariusAdv - 01.03.2018
Hello! I have problems with paint system.
Код:
if(PlayerInfo[playerid][pPaintBallG] > 0)
{
new string [128],sendername[30];
GetPlayerName(playerid, sendername, sizeof(sendername));
foreach(Player, i)
{
if(PlayerInfo[i][pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
{
format(string,sizeof(string),"%s has left the paintball arena.", sendername);
SendClientMessage(i, COLOR_YELLOW, string);
}
}
curatj[playerid] = 0;
for (new i = 0; i != 5; ++i) SendDeathMessageToPlayer(playerid, 1001, 1001, 1001);
PlayerTextDrawHide(playerid, PaintBallText[playerid]);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
paintp[PlayerInfo[playerid][pPaintBallG]]--;
PlayerInfo[playerid][pPaintBallG] = 0;
PlayerInfo[playerid][pPaintBallKills] = 0;
PlayerInfo[playerid][pPaintBallVoted] = 0;
PlayerInfo[playerid][pPaintBallVoted2] = 0;
ResetPlayerWeaponsEx(playerid);
ResetPlayerWeapons(playerid);
SetPlayerArmourEx(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerToTeamColor(playerid);
SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
SetPlayerPos(playerid, 1154.4122,-1440.0548,15.7969);
}
Error's
Код:
error 017: undefined symbol "ResetPlayerWeaponsEx"
error 017: undefined symbol "SetPlayerArmourEx"
error 017: undefined symbol "SetPlayerToTeamColor"
error 017: undefined symbol "string"
error 017: undefined symbol "string"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Re: Paint -
Jithu - 01.03.2018
Do it as ResetPlayerWeapon...
and it should be SetPlayerArmour ....
dont use SetPlayerToTeamColor...
did u add string[numbers]??
like this new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
then format(string, sizeof (string), "%s has did something..!", pName);
SendClientMessageToAll(COLOR_BLUE, string);
This is just an example
Re: Paint -
Jithu - 01.03.2018
Remove sendername[30];
Re: Paint -
MariusAdv - 01.03.2018
I resolve that error's and now I have new error's in another code.
Код:
if(PlayerInfo[playerid][pPaintBallG] > 0)
{
foreach(Player, iddd)
{
if(PlayerInfo[iddd][pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
{
SendDeathMessageToPlayer(iddd, killerid, playerid, reason);
}
}
new string[64];
PlayerInfo[killerid][pPaintBallKills]++; Line 818
format(string, sizeof(string), "You have been killed by %s.", pName(killerid));
SendClientMessage(playerid, COLOR_GENANNOUNCE, string);
format(string,sizeof(string),"You have killed %s. You now have %d kills.", GetName(playerid), PlayerInfo[killerid][pPaintBallKills]);
SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
Error's
Код:
(818) : error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Re: Paint -
Jithu - 01.03.2018
can u give upside codes too??
related to this
and it showing error error 001: expected token: ";", but found ")"
that means you didnt added ; or }, ""
Re: Paint -
Jithu - 01.03.2018
hmm, can u give those error lines here..i think i can help you from that
Re: Paint -
Jithu - 01.03.2018
did you used #include <foreach>??
Re: Paint -
MariusAdv - 01.03.2018
Porblems with:
Код:
if(PlayerInfo[playerid][pPaintBallG] > 0)
{
foreach(Player, iddd)
{
if(PlayerInfo[iddd][pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
{
SendDeathMessageToPlayer(iddd, killerid, playerid, reason);
}
}
new string[64];
PlayerInfo[killerid][pPaintBallKills]++;
HERE format(string, sizeof(string), "You have been killed by %s.", pName(killerid));
SendClientMessage(playerid, COLOR_GENANNOUNCE, string);
format(string,sizeof(string),"You have killed %s. You now have %d kills.", GetName(playerid), PlayerInfo[killerid][pPaintBallKills]);
SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
if(PlayerInfo[killerid][pPaintBallG] == 3)
{
if(PlayerInfo[killerid][pPaintBallKills] == 2) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 29, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 4) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 28, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 6) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 33, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 8) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 32, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 10) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 25, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 12) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 26, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 14) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 34, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 16) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 27, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 18) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 31, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 20) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 30, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 22) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 23, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 24) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 22, 1000); }
else if(PlayerInfo[killerid][pPaintBallKills] == 26) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 9, 1); }
else if(PlayerInfo[killerid][pPaintBallKills] == 28) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 4, 1); }
}
Re: Paint -
MariusAdv - 01.03.2018
Error's
Код:
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Re: Paint -
Jithu - 01.03.2018
format(string,sizeof(string),"You have killed %s. You now have %d kills.", GetName(playerid), PlayerInfo[killerid][pPaintBallKills]);
i think This should be like this
format(string,sizeof(string),"You have killed %s. You now have %d kills.", GetPlayerName(playerid), PlayerInfo[killerid][pPaintBallKills]);
try to add GetPlayerName instead of GetName....
did you add #include <foreach> before?
Try PlayerInfo[killerid][pPaintBallKills]++
instead of
PlayerInfo[killerid][pPaintBallKills]++;