Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //topo:
- new Float:gpos[100][4];
- //OnPlayerCommandText:
- if(!strcmp(cmd, "/marcar", true) && IsPlayerAdmin(playerid))
- {
- new tmp[256];
- tmp = strtok(cmdtext, idx);
- new slot = strval(tmp);
- if(!strlen(tmp))return SendClientMessage(playerid, 0xFFFFFFFAA, "USE: /marcar [slot]");
- if(slot >= 1 && slot <= 100)
- {
- slot--;
- new Float:x, Float:y, Float:z, Float:a;
- if(IsPlayerInAnyVehicle(playerid))
- {
- GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
- } else {
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- }
- gpos[slot][0] = x;
- gpos[slot][1] = y;
- gpos[slot][2] = z;
- gpos[slot][3] = a;
- SendClientMessage(playerid, 0xFFFFFFAA, "Salvo.");
- } else {
- SendClientMessage(playerid, 0xFFFFFFAA, "Slot inv�lido (1~100).");
- }
- return 1;
- }
- if(!strcmp(cmd, "/evento", true))
- {
- new tmp[256];
- tmp = strtok(cmdtext, idx);
- new slot = strval(tmp);
- if(!strlen(tmp))return SendClientMessage(playerid, 0xFFFFFFFAA, "USE: /evento [n�mero]");
- if(slot >= 1 && slot <= 100)
- {
- slot--;
- if(gpos[slot][0] != 0.0 && gpos[slot][1] != 0.0)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- SetVehiclePos(GetPlayerVehicleID(playerid),
- gpos[slot][0],
- gpos[slot][1],
- gpos[slot][2]);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), gpos[slot][3]);
- } else {
- SetPlayerPos(playerid,
- gpos[slot][0],
- gpos[slot][1],
- gpos[slot][2]);
- SetPlayerFacingAngle(playerid, gpos[slot][3]);
- }
- SendClientMessage(playerid, 0xFFFFFFAA, "Teleportado.");
- } else {
- SendClientMessage(playerid, 0xFFFFFFAA, "Evento vazio!");
- }
- } else {
- SendClientMessage(playerid, 0xFFFFFFAA, "Evento inv�lido (1~100).");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment