Sziaszok mit rontottam el valami változot nem adtam meg?
enum PizzaCars
{
pizza1,
pizza2,
pizza3,
pizza4,
pizza5,
pizza6,
pizza7,
pizza8,
pizza9,
pizza10,
pizza11,
pizza12,
pizza13,
pizza14,
};
new Cars[PizzaCars];
enum SzallitoCars
{
Szallito1,
Szallito2,
Szallito3,
Szallito4,
Szallito5,
Szallito6,
Szallito7,
};
new Szallito[szallitoCars];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[pizza1] || CarCheck == Cars[pizza2] || CarCheck == Cars[pizza3] || CarCheck == Cars[pizza4] || CarCheck == Cars[pizza5] || CarCheck == Cars[pizza6] || CarCheck == Cars[pizza7] || CarCheck == Cars[pizza8]|| CarCheck == Cars[pizza9]|| CarCheck == Cars[pizza10]|| CarCheck == Cars[pizza11]|| CarCheck == Cars[pizza12]|| CarCheck == Cars[pizza14])
{
if( GetPVarInt( playerid, \"iRank\" ) == 1)
{
new rand = random(sizeof(UTCP));
SetPlayerCheckpoint(playerid, UTCP[rand][0],UTCP[rand][1],UTCP[rand][2], 4);
CPStatus[playerid] = 1;
GameTextForPlayer(playerid, \"~g~Elkezdtel dolgozni!\", 3000, 3);
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,-1,\"Nem dolgozol ételkihordóként\");
}
if(newstate == PLAYER_STATE_DRIVER)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Szallito[szallito1] || CarCheck == Szallito[szallito2] || CarCheck == Szallito[szallito3] || CarCheck == Szallito[szallito4] || CarCheck == Szallito[szallito5] || CarCheck == Szallito[szallito6] || CarCheck == Szallito[szallito7])
{
if( GetPVarInt( playerid, \"iRank\" ) == 10)
{
SendClientMessage(playerid,-1,\"Elkezdted a munkát\");
GameTextForPlayer(playerid, \"~g~Elkezdtel dolgozni!\", 3000, 3);
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,-1,\"Nem dolgozol ebben a munkában\");
}
}
}
{
}
}
}
return 1;
}
warning:
C:\\Documents and Settings\\Csalad\\Asztal\\[HUN]RPG\\gamemodes\\FallRPGn.pwn(226) : warning 219: local variable \"CarCheck\"
shadows a variable at a preceding level
Ez szerepel a warningolo sorba:
new CarCheck = GetPlayerVehicleID(playerid);