Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new PickupOnline;
- new JaClicou[500];
- new Nome[24];
- new Fala[256];
- public OnGameModeInit()
- {
- PickupOnline = CreatePickup(1240,1,2033.80,-1414.60,17.0);
- Create3DTextLabel("Pickup Online\nTecle F",0xFF0000AA,2033.80,-1414.60,17.0,10.0,0,0);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid)
- {
- if(newkeys == KEY_SECONDARY_ATTACK)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- if(JaClicou[playerid] == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid,2033.80,-1414.60,17.0))
- {
- GetPlayerName(playerid,Nome,sizeof(Nome));
- format(Fala,sizeof(Fala),"%s recebeu uma Pickup Online.",Nome);
- SendClientMessageToAll(0xBFBFBFAA,Fala);
- SetPlayerHealth(playerid,100.0);
- SetPlayerArmour(playerid,100.0);
- JaClicou[playerid] = 1;
- SetTimerEx("JaClicouOFF",120000,0,"i",playerid);
- SetTimerEx("SavePlayerPos",1000,0,"i",playerid);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid,0xBFBFBFAA,"Espere 2 minutos.");
- return 1;
- }
- }
- return 1;
- }
- forward JaClicouOFF(playerid);
- public JaClicouOFF(playerid)
- {
- SendClientMessage(playerid,0xBFBFBFAA,"Sua pickup online esta liberada. Para receber, va até o Hospital.");
- JaClicou[playerid] = 0;
- return 1;
- }
- forward SavePlayerPos(playerid)
- {
- SetPlayerPos(playerid,2033.80,-1414.60,17.0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement