28.02.2010, 19:57
Hey Samp forum.
-I've tried 2 different ways to make a command like /setmapicon
and then it saves the pos, iconid and markertype in a file. when a player login then he should load the file aka. he should load the icons. but i've failled.
i made one there was 666 lines long and now i had to delete it..
Hellfire gave me this:
but it has some errors.
Anyone got a easy way to make this command so it saves and loads?
-I've tried 2 different ways to make a command like /setmapicon
and then it saves the pos, iconid and markertype in a file. when a player login then he should load the file aka. he should load the icons. but i've failled.
i made one there was 666 lines long and now i had to delete it..
Hellfire gave me this:
pawn Код:
CMD:setmapicon(playerid, params[])
{
new ID, Type, string[128];
if(sscanf(params, "dd", ID, Type)) ERRORMSG(playerid, "[WR Usage]: /setmapicon <Iconid> <Marker Type>");
else if(IDused[ID] == true)
{
format(string, sizeof(string), "[WR Server]: That iconid is in use! try %i+1", ID);
ERRORMSG(playerid, string);
}
else
{
new Float:Loc[3];
new idstr[3];
format(idstr, 3, "%d", ID);
GetPlayerPos(playerid, Loc[0], Loc[1], Loc[2]);
dini_Set("Icons", idstr, "SetPlayerMapIcon(playerid, %d, %f, %f, %f, %d, 0)" ID, Loc[0], Loc[1], Loc[2], Type);
}
return 1;
}
Anyone got a easy way to make this command so it saves and loads?