Problem: Zanima me nesto oko stringa.Cuo sam da on mnogo usporava igru pa me zanima po cemu da gledam koji string da stavim?Vidim da kod nekih komandi nema uopste stinga sad cu dati primer!
ovde ima string
CMD:xyzgoto(playerid, params[])
{
if(PlayerInfo >= 3)
{
new Float:x, Float:y, Float:z;
new string;
if (sscanf(params, "fff", x, y, z)) SendClientMessage(playerid, COLOR_GREY, "Koriscenje: \"/xycgoto \"");
else
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), x,y,z);
}
else
{
SetPlayerPos(playerid, x, y, z);
}
format(string, sizeof(string), "You've set your coord to %f, %f, %f", x, y, z);
SendClientMessage(playerid, 0xBBBBBBAA, string);
}
}
return 1;
} Ovde ima string i koliko je ovde normalan da bude?
CMD:pokreni(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo != 21)
{
SendClientMessage(playerid, COLOR_GREY, "Niste cistac ulica ! ");
return 1;
}
if(PlayerIsSweeping == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vec cistite ulice ! ");
return 1;
}
new idcar = GetPlayerVehicleID(playerid);
if(IsASweeper(idcar))
{
PlayerIsSweeping = 1;
TogglePlayerControllable(playerid, 1);
PlayerInfo = gSweeperPoints[cucp];
PlayerInfo = gSweeperPoints[cucp];
PlayerInfo = gSweeperPoints[cucp];
SetPlayerCheckpoint(playerid, PlayerInfo, PlayerInfo, PlayerInfo, 5.0);
SendClientMessage(playerid, COLOR_WHITE, " Vase radno vreme je pocelo. Idite na crveni marker.");
}
}
return 1;
}