Jump to content

Recommended Posts

Posted

    if (strcmp("/seatbelt on", cmdtext, true, 10) == 0)
        {
        SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt ON!**");
        SetPlayerScore(playerid, 100);
        return 1;
        }
    if (strcmp("/seatbelt off", cmdtext, true, 10) == 0)
        {
        SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt OFF!**");
        SetPlayerScore(playerid, -1);
        return 1;
        }

 

Cand scriu /seatbelt on se pune si ON si OFF. cand scriu /seatbelt off se pune doar OFF. cred ca e ceva problema la return? Help

Posted
10 hours ago, AlexCelTare said:

    if (strcmp("/seatbelt on", cmdtext, true, 10) == 0)
        {
        SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt ON!**");
        SetPlayerScore(playerid, 100);
        return 1;
        }
    if (strcmp("/seatbelt off", cmdtext, true, 10) == 0)
        {
        SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt OFF!**");
        SetPlayerScore(playerid, -1);
        return 1;
        }

 

Cand scriu /seatbelt on se pune si ON si OFF. cand scriu /seatbelt off se pune doar OFF. cred ca e ceva problema la return? Help

Creaza o variabila sus la inceputul gm-ului.

new seatbelt[MAX_PLAYERS];

if (strcmp("/seatbelt", cmdtext, true, 10) == 0)
{
        if(seatbelt[playerid] == 0) return seatbelt[playerid]++, SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt ON!**"), SetPlayerScore(playerid, 100);
        if(seatbelt[playerid] == 1) return seatbelt[playerid]--, SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt OFF!**"), SetPlayerScore(playerid, -1);
}

 

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Posted
1 hour ago, StrikerM said:

Creaza o variabila sus la inceputul gm-ului.

new seatbelt[MAX_PLAYERS];

if (strcmp("/seatbelt", cmdtext, true, 10) == 0)
{
        if(seatbelt[playerid] == 0) return seatbelt[playerid]++, SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt ON!**"), SetPlayerScore(playerid, 100);
        if(seatbelt[playerid] == 1) return seatbelt[playerid]--, SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt OFF!**"), SetPlayerScore(playerid, -1);
}

 

mersi mult bro te pup 

  • Like 1
Posted
new bool: gIsActiveSeatBelt[MAX_PLAYERS char];

if( !strcmp("/seatbelt", cmdtext, true, 10) )
{
	gIsActiveSeatBelt{playerid} = !gIsActiveSeatBelt{playerid};
	
	if( gIsActiveSeatBelt{playerid} ) {
		SetPlayerScore(playerid, -1);
		SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt ON!**");
	} else {
		SetPlayerScore(playerid, 100);
		SendClientMessage(playerid, 0x2E8B57AA, "*Seatbelt OFFF!**");
	}
	return true;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.