normaly it should work...
#1

hey guys, i need help with some REALLY weird things

Okay, first one: *solution found, thanks to everyone *

second thing: I want an anti-team kill script >.<
I made a SHIT as script...
Can anyone give me a link for it or just post the script? I know, i have to put it at "OnPlayerDeath"

Thirdt(i know, maaaany things >.<): I need a a correction of my cool down timer:
Код:
	if (strcmp("/secretplace", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid,red,"Look behind you, a minigun... but how to come back? Think about a solution!");
		SendClientMessage(playerid,GREEN,"You Can use this cmd again after 5 Mins!");
		SetPlayerPos(playerid,-10.2499,2338.7620,24.3034);
		SetPlayerFacingAngle(playerid,350.5836);
		SetTimer(secret,5000,0);
	}
4th: I want, that a explotion appears, each time the player choose a character >.<
i have no idea how to create that

D'UH, that are many things, i know, but i'm new and i need that to know

Thanks for every hel i can get >.<

P.S.: Why is this smiley 2 times there? xD
Reply
#2

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == 432)
    {
        if(GetPlayerScore(playerid) < 100)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
        }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Redgie
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if (vehicleid == 432)
    {
        if(GetPlayerScore(playerid) < 100)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
        }
    }
    return 1;
}
Nope that wont work friend,

I had the same, OnPlayerEnterVehicle is ON ENTERING, not when the player is inside.

Anyways try this:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
        if (GetVehicleModelID(GetPlayerVehicleID(playerid)) == 432)
        {
            if(GetPlayerScore(playerid) < 100)
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
            }
        }
    }
    return 1;
}
Reply
#4

Woops! Didn't spot that, here's a new version of mine then ^^

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid)==432 && GetPlayerScore(playerid) < 100)
    {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
    }
    return 1;
}
Reply
#5

I suppose you use GetPlayerVehicleID to get vehicle model, it will get the ID not vehicle model!
You need to use GetVehicleModel
Reply
#6

I would go with this:

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == 432)
    {
        if(GetPlayerScore(playerid) < 100)
        {
            ClearAnimations(playerid);
            SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
        }
    }
    return 1;
}
This will make it so whoever tries to enter the vehicle will not be able to jack any player that's in the rhino
Reply
#7

i will take coole210 code, i hope he doesn't mind

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 432)
    {
        if(GetPlayerScore(playerid) < 100)
        {
            ClearAnimations(playerid);
            SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
        }
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by armyoftwo
Посмотреть сообщение
I suppose you use GetPlayerVehicleID to get vehicle model, it will get the ID not vehicle model!
You need to use GetVehicleModel
Oh yeah forgot, edited my post
Reply
#9

wow, thanks guys for so mayn replies
*Give everyone a cookie*
Now i need that anti-team kill thing and the explosions >.<

Can please anyone do it? >.<
Reply
#10

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid))==432 && GetPlayerScore(playerid) < 100)
    {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, LIGHTRED,"You need At Least 100 Score to enter this Vehicle!");
    }
    return 1;
}
Please use this and not the ClearAnimation version, anything called under OnPlayerEnterVehicle can be bypassed by someone close enough to the car.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)