Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Sistema de ver desafio con spawns random By Badyx
- TIEMPO 6 MINUTOS
- FECHA 21/09/2012
- */
- #include <a_samp>
- new bool:ViendoDesafio[MAX_PLAYERS];
- new bool:FueaDesafio[MAX_PLAYERS];
- new Float:SpawnRandom[2][3] = {
- {1958.3783,1343.1572,15.3746},
- {1705.2347,1025.6808,10.8203}
- };
- #if defined FILTERSCRIPT
- #else
- main()
- {
- print(" Sistema de ver desafio con spawns random By Badyx");
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- ViendoDesafio[playerid] = false;
- FueaDesafio[playerid] = false;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- ViendoDesafio[playerid] = false;
- FueaDesafio[playerid] = false;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (ViendoDesafio[playerid] == true)
- {
- if (strcmp("/salirdesafio", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, -1, " {98CDFF}Saliste {FFFFFF}del {FFA4CB}desafio");
- TogglePlayerControllable(playerid, 1);
- ViendoDesafio[playerid] = false;
- FueaDesafio[playerid] = false;
- new rand = random(sizeof(SpawnRandom));
- SetPlayerPos(playerid, SpawnRandom[rand][0], SpawnRandom[rand][1], SpawnRandom[rand][2]); // Warp the player
- return 1;
- }
- SendClientMessage(playerid, -1, " {98CDFF}No puedes usar comandos {FFFFFF}mientras eres espectador de un desafio. Usa{FFA4CB}/salirdesafio");
- return 1;
- }
- if (strcmp("/VerDesafio", cmdtext, true, 10) == 0)
- {
- if (ViendoDesafio[playerid] == false)
- {
- //SetPlayerPos(playerid,COORDENADASX,COORDENADASY,COORDENADASZ);
- SendClientMessage(playerid, -1, " {98CDFF}Fuiste como {FFFFFF}espectador al {FFA4CB}desafio");
- ViendoDesafio[playerid] = true;
- FueaDesafio[playerid] = true;
- return 1;
- }
- return SendClientMessage(playerid, -1, " {98CDFF}Usted ya esta como {FFFFFF}espectador en el {FFA4CB}desafio");
- }
- return 0;
- }
- public OnPlayerUpdate(playerid)
- {
- if (ViendoDesafio[playerid] == true)
- {
- TogglePlayerControllable(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- return 1;
- }
- //============================================================================//
- // //
- // FINAL DEL SCRIPT //
- // //
- // SI TE SIRVIO RESPETA EL TRABAJO DEL CREADOR //
- // //
- //============================================================================//
Advertisement
Add Comment
Please, Sign In to add comment