Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new lektuvukas;
- public OnGameModeInit()
- {
- ConnectNPC("Pilotas", "lektuvas");
- lektuvukas = AddStaticVehicle(519, 0.0, 0.0, 5.0, 0.0, 3, 3);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOGID)
- {
- if(response)
- {
- new botoID = INVALID_PLAYER_ID, npcname[MAX_PLAYER_NAME];
- for(new p; p < GetMaxPlayers(); p++)
- {
- if(!IsPlayerNPC(p)) continue;
- GetPlayerName(p, npcname, sizeof(npcname));
- if(!strcmp(npcname, "Pilotas", true))
- {
- botoID = p;
- break;
- }
- }
- if(botoID == INVALID_PLAYER_ID) return 1;
- PutPlayerInVehicle(botoID, lektuvukas, 0);
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectateVehicle(playerid, lektuvukas);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement