05.11.2010, 21:09
I have this /parkhere command:
And I get all things in there to work. Now what I want to do is to save the 3DTextLabel somehow, and then always recreate it on GameModeInit.
How should I do this?
Код:
if(!strcmp(cmdtext, "/parkhere", true)) { if(gPlayerLogged[playerid] == 1) { if(IsPlayerInAnyVehicle(playerid)) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); GetVehiclePos(GetPlayerVehicleID(playerid), P1, P2, P3); GetVehicleZAngle(GetPlayerVehicleID(playerid), P4); dini_FloatSet(file, "ParkingPosX", P1); dini_FloatSet(file, "ParkingPosY", P2); dini_FloatSet(file, "ParkingPosZ", P3); dini_FloatSet(file, "ParkingAng", P4); SendClientMessage(playerid, GREEN, "You've successfully created your parking space!"); Create3DTextLabel("This parking space is reserved", YELLOW, P1, P2, P3+1, 20, 0, 0); } else { SendClientMessage(playerid, RED, "You're not in a vehicle!"); } } gPlayerLogged[playerid] = 0; return 1; }
How should I do this?