Ryder_RO Posted August 10, 2011 Report Share Posted August 10, 2011 Salut,baieti.Am si eu o problema.Cand am bagat comanda de jos.Pe ZCMD.Cand dau /up INTALTIMEA.Imi zice doar UP intaltime nu ma ridica.Asa a patit si Sweet si eu.Daca mio puteti face (MENTIONEZ folosesc SSCANF)Repede daca se poate.CMD:up(playerid,params[]) { new Float:x, Float:y, Float:z; new height; if(height != 0) { if(IsPlayerInAnyVehicle(playerid)) { GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height); } else { GetPlayerPos(playerid, x, y, z); GivePlayerWeapon(playerid, 46, 1); SetPlayerPos(playerid, x, y, z + height); } } else { SendClientMessage(playerid, COLOR_GREEN, "/UP {FFFFFF}|inaltime|"); } return 1; } Link to comment Share on other sites More sharing options...
DJ_Dany Posted August 10, 2011 Report Share Posted August 10, 2011 incearca formula de idx new cmd[256];new idx;cmd = strtok(cmdtext, idx);if(strcmp( cmd, "/up", true ) == 0 ){new Float:X, Float:Y, Float:Z;new tmp[256];tmp = strtok( cmdtext, idx );Apoi cred ca te descurci ... o sa incerc acuma sa o fac. Si iti spun daca mi-a iesit si ti-o dau.Uitate mai jos >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Uite aiciiti trebuie mai intai:[pawno code] //dami si mie prin pm cum se foloseste codul asta de pawno ca la mine nu apare daca apas la bara sus...zimi clar cum se scrie#include "../include/gl_common.inc" //ca sa iti mearga cmdpublic OnPlayerCommandText(playerid, cmdtext[]){new hx; //am puso sa fie pt inaltime :hcmd = strtok(cmdtext, hx);if(strcmp(cmd,"/up",true)==0){new Float:X, Float:Y, Float:Z;new tmp[256];tmp = strtok( cmdtext, hx );GetPlayerPos( playerid, X, Y, Z );SetPlayerPos(playerid,X,Y,Z+strval(tmp));return 1;}[/pawno code]Am facut-o adineauri,am si testat-o ,merge....Pui tu textu o faci lafel si pt masina cu +strval(tmp) si gata.:wink: Link to comment Share on other sites More sharing options...
Ryder_RO Posted August 10, 2011 Author Report Share Posted August 10, 2011 ma eu am zis ca am problema cu comanda up in zcmdnu ca vreau comanda in strcmdX(stie careva dc face asa comanda Link to comment Share on other sites More sharing options...
xxSPEEDYxx Posted August 10, 2011 Report Share Posted August 10, 2011 CMD:up( playerid, params[ ] ) { new Float:x, Float:y, Float:z; new height = strval( params); if( height == 0 ) return SendClientMessage( playerid, COLOR_RED, "USAGE: {FFFF00}/up [Height]" ); if( IsPlayerInAnyVehicle( playerid)) { GetVehiclePos( GetPlayerVehicleID( playerid), x, y, z); SetVehiclePos( GetPlayerVehicleID( playerid), x, y, z + height); } else { GetPlayerPos( playerid, x, y, z); GivePlayerWeapon( playerid, 46, 1); SetPlayerPos( playerid, x, y, z + height); } return 1; } Fara reclama in semnatura! Link to comment Share on other sites More sharing options...
Ryder_RO Posted August 10, 2011 Author Report Share Posted August 10, 2011 ms mult speedy Link to comment Share on other sites More sharing options...
Question
Ryder_RO
Salut,baieti.
Am si eu o problema.
Cand am bagat comanda de jos.
Pe ZCMD.
Cand dau /up INTALTIMEA.
Imi zice doar UP intaltime nu ma ridica.
Asa a patit si Sweet si eu.
Daca mio puteti face (MENTIONEZ folosesc SSCANF)
Repede daca se poate.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts