/showid
#1

How would I make a command if someone says: /showid [id]
----------------------------
Citizen of Bayside
Name:
Age:

Licenses:
(If you have a gun license)
(if you have a Driving License)
(if you have a flying License)
----------------------------

I tried and failed, so I ended up deleting it >.>
Reply
#2

read my pm..
Reply
#3

Give us your try and we will correct it. Anyay post variables for Name, Age and Licences
Reply
#4

sorry Dimi I deleted it, I did say above >.<
Reply
#5

Quote:
Originally Posted by Dimi
Anyay post variables for Name, Age and Licences
^^^^
Reply
#6

as in: pName, pAge and pLicenses?
Reply
#7

Код:
CMD:showid(playerid, params[]) {

	format(szMessage, sizeof(szMessage), "%s | Age: %d (born %d)", playerVariables[targetid][pNormalName], date[0]-playerVariables[targetid][pAge]);
The format, just use that as an example and I will learn from there.
Reply
#8

PHP код:
CMD:showid(playerid,params[])
{
    new 
target,msg[128],tName[24],aName[24],Float:Pos[3];
    if(
sscanf(params,"d",target)) return SendClientMessage(playerid,-1,"Usage: /showid [id]");
    if(!
IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"Invalid player ID!");
    
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
    if(!
IsPlayerInRangeOfPoint(target,7.0,Pos[0],Pos[1],Pos[2])) return SendClientMessage(playerid,-1,"This player is too away from you!");
    
GetPlayerName(playerid,aName,24);
    
GetPlayerName(target,tName,24);
    
SendClientMessage(target,-1,"===================================");
    
format(msg,128,"Indetification of %s(%d):",aName,playerid);
    
SendClientMessage(target,-1,msg);
    
format(msg,128,"Name: %s | Age: %i | Driving Licence: %i | Flying Licence: %i | Gun Licence: %i",pName[playerid],pAge[playerid],pLicences[playerid][Driving],pLicences[playerid][Flying],pLicences[playerid][Gun]);
    
//You edit Variables how they are in your script
    
SendClientMessage(target,-1,msg);
    
SendClientMessage(target,-1,"===================================");
    
format(msg,128,"You have showed your indetification card to %s(%d)."tName,target);
    
SendClientMessage(playerid,-1,msg);
    return 
1;

Something like this. It's UNTESTED! You edit it however you want
Reply
#9

4 errors, my player eNums for the licenses
pDL, pGl, pFl and it still dont work
Reply
#10

Edit my code to yours and then post it together with errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)