A few questions
#1

does anyone have a Simple /engine command: /engine (on) and again /engine (off)

How can you make a command where if you type /getstats [ID] it gets a players /stats.

Код:
error 010: invalid function or declaration
Код:
CMD:serverupdates (playerid, params[]) {
	SendClientMessage(playerid, COLOR_COOLBLUE, "---------- Server Updates: ----------");
	SendClientMessage(playerid, COLOR_YELLOW, "- Added new gang: West Side Mafia");
	SendClientMessage(playerid, COLOR_YELLOW, "- Added new cop garage (officers only)");
	SendClientMessage(playerid, COLOR_YELLOW, "- Added a Copter to SFFMD");
	SendClientMessage(playerid, COLOR_YELLOW, "- You can now buy helicopters, speak with an admin about it");
	SendClientMessage(playerid, COLOR_COOLBLUE, "---------- Server Updates: ----------");
	}

	return 1;
}
Reply
#2

3)
pawn Код:
CMD:serverupdates (playerid, params[])
{
    SendClientMessage(playerid, COLOR_COOLBLUE, "---------- Server Updates: ----------");
    SendClientMessage(playerid, COLOR_YELLOW, "- Added new gang: West Side Mafia");
    SendClientMessage(playerid, COLOR_YELLOW, "- Added new cop garage (officers only)");
    SendClientMessage(playerid, COLOR_YELLOW, "- Added a Copter to SFFMD");
    SendClientMessage(playerid, COLOR_YELLOW, "- You can now buy helicopters, speak with an admin about it");
    SendClientMessage(playerid, COLOR_COOLBLUE, "---------- Server Updates: ----------");
    return 1;
}
2) Use sscanf, format and SendClientMessage

1) Use search. There are at least 200+ scripts like that.

P.S. Hope this helps
Reply
#3

2) Im new to scripting thats why I was asking, :P.. If its easy can you whip me one up quickly please
1) already have done can't find them
3) thanks it worked

Rep++
Reply
#4

PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:getstats(playerid,params[])
{
    new 
target,tName[24],msg[128];
    if(
sscanf(params,"d",target)) return SendClientMessage(playerid,-1,"Usage: /getstats [ID]");
    if(!
IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"Player isn't connected!");
    
GetPlayerName(target,tName,24);
    
format(msg,128,"Stats of %s(%d)| Money: $%s | Score: %i",tName,target,GetPlayerMoney(target),GetPlayerScore(target));
    
SendClientMessage(playerid,-1,msg);
    return 
1;

EDIT:
1) Something like this? http://forum.sa-mp.com/showthread.ph...ight=%2Fengine
or this? http://forum.sa-mp.com/showthread.ph...ight=%2Fengine
Reply
#5

thank you so much...
How would I make this so only faction 7 would be able to us it
Sorry btw im repping you.
Reply
#6

I added for vehicle control in previous post.
Before sscanf add
PHP код:
if(Factionid !=7) return SendClientMessage(playerid,-1,"You can't use this command"); 
Just my factionid replace with yours
Reply
#7

I know thanks, and I need one when the engine dosen't stall or anything like that, it's fine I can search thanks for your help

EDIT: I get this error:
Код:
error 017: undefined symbol "Factionid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#8

No problem.
Reply
#9

sorry can you check the error
Reply
#10

As I told you you must replace that one. I don't know how are you defining faction id..,.. PlayerInfo[playerid][Faction] or how... Just replace that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)