24.07.2009, 17:18
guys how i can fix my gametext ?
ok here is the code
i want when player enter to the bullet at terorist or soliders it write :
Example for Soliders:
i give this ''%s (%d)'' to show player name and his ID but it wont ^^
here is the picture of my problem :
/imageshack/i/samp457.png/
so i want when player enter the Enemy Vehicle it Write: ''Player (players name and ID) ... bla bla bla''
not : ''Player %s (%d) ... bla bla bla''
So thanks for any help
ok here is the code
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid;
if(newstate == PLAYER_STATE_DRIVER)
{
vehicleid = GetPlayerVehicleID(playerid);
if(gTeam[playerid] == TEAM_TERORIST && vehicleid == OBJECTIVE_VEHICLE_TERORIST)
{ // It's the objective vehicle
GameTextForAll("~w~PLAYER %s (%d) IS DRIVING THE ~b~SOLIDER'S BULLET ~w~BACK ON ~r~TERORIST'S SPAWN, ~w~DESTROY HIM SOLIDERS !", 6000, 3);
gObjectiveGreenPlayer = playerid;
}
if(gTeam[playerid] == TEAM_SOLIDER && vehicleid == OBJECTIVE_VEHICLE_SOLIDER)
{ // It's the objective vehicle
GameTextForAll("~w~PLAYER %s (%d) IS DRIVING THE ~r~TERORIST'S BULLET ~w~BACK ON ~b~SOLIDER'S SPAWN, ~w~DESTROY HIM TERORISTS !", 6000, 3);
gObjectiveBluePlayer = playerid;
}
}
else if(newstate == PLAYER_STATE_ONFOOT)
{
if(playerid == gObjectiveGreenPlayer) {
gObjectiveGreenPlayer = (-1);
SetPlayerToTeamColor(playerid);
}
if(playerid == gObjectiveBluePlayer) {
gObjectiveBluePlayer = (-1);
SetPlayerToTeamColor(playerid);
}
}
return 1;
}
Example for Soliders:
Код:
GameTextForAll("~w~PLAYER %s (%d) IS DRIVING THE ~r~TERORIST'S BULLET ~w~BACK ON ~b~SOLIDER'S SPAWN, ~w~DESTROY HIM TERORISTS !", 6000, 3);
here is the picture of my problem :
/imageshack/i/samp457.png/
so i want when player enter the Enemy Vehicle it Write: ''Player (players name and ID) ... bla bla bla''
not : ''Player %s (%d) ... bla bla bla''
So thanks for any help

