Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public VoiceTimer()
- {
- new playersToJson[80000];
- new count = 0;
- for(new player = 0; player < MAX_PLAYERS; player++) {
- if(IsPlayerConnected(player)) {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(player, name, sizeof(name));
- new Float:x, Float:y, Float:z;
- GetPlayerPos(player, x, y, z);
- if(count == 0)
- format(playersToJson, sizeof (playersToJson), "{\"Name\":\"%s\", \"X\":%f, \"Y\":%f, \"Z\":%f, \"Radius\":10, \"Dimension\":0, \"Muted\":false}", name, x, y, z);
- else
- format(playersToJson, sizeof (playersToJson), "%s,{\"Name\":\"%s\", \"X\":%f, \"Y\":%f, \"Z\":%f, \"Radius\":10, \"Dimension\":0, \"Muted\":false}", playersToJson, name, x, y, z);
- count++;
- }
- }
- format(playersToJson, sizeof (playersToJson), "[%s]", playersToJson);
- WriteOneString("coords.json", playersToJson);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement